1
0
mirror of https://github.com/flextype/flextype.git synced 2025-08-11 23:54:06 +02:00

Flextype Core: Entries - method fetch() - improvements.

This commit is contained in:
Awilum
2019-02-13 18:57:08 +03:00
parent d5b028e214
commit e66f242aef

View File

@@ -286,7 +286,7 @@ class Entries
* Fetch entry
*
* @param string $entry Entry
* @return string|false The entry contents or false on failure.
* @return array|false The entry contents or false on failure.
*/
public static function fetch(string $entry)
{
@@ -320,13 +320,7 @@ class Entries
*/
public static function fetchAll(string $entry)
{
$entry_file = PATH['entries'] . '/' . $entry . '/entry.html';
if (Filesystem::has($entry_file)) {
return YamlParser::decode(Filesystem::read($entry_file));
} else {
return false;
}
}
/**