From 3423d460df7c9a7b401dc823c703d2f4a34d7bf1 Mon Sep 17 00:00:00 2001 From: Awilum Date: Sun, 11 Aug 2019 11:10:35 +0300 Subject: [PATCH] Flextype Core: Add ability to work with different types of content #212 #186 - FrontmatterParser implementation --- flextype/core/Entries.php | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/flextype/core/Entries.php b/flextype/core/Entries.php index 32303364..ff8003a5 100755 --- a/flextype/core/Entries.php +++ b/flextype/core/Entries.php @@ -457,7 +457,16 @@ class Entries return Filesystem::has($this->_file_location($id)); } - private function _one_of(string $id) + /** + * Helper method _one_of + * + * @param string $id Entry id + * + * @return bool True on success, false on failure. + * + * @access private + */ + private function _one_of(string $id) : bool { foreach (Parser::$drivers as $driver) { $driver_file = PATH['entries'] . '/' . $id . '/entry' . '.' . $driver['ext'];