From eaee15c383017a783aeaf25c7cda59de5b909307 Mon Sep 17 00:00:00 2001 From: Awilum Date: Mon, 12 Aug 2019 00:20:35 +0300 Subject: [PATCH] Flextype Core: Add ability to work with different types of content #212 #186 - Entires updates --- flextype/core/Entries.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/flextype/core/Entries.php b/flextype/core/Entries.php index 7f1d1c3a..ba698598 100755 --- a/flextype/core/Entries.php +++ b/flextype/core/Entries.php @@ -390,7 +390,7 @@ class Entries * * @access public */ - public function create(string $id, array $data) : bool + public function create(string $id, array $data, string $driver = 'json') : bool { $entry_dir = $this->_dir_location($id); @@ -399,7 +399,7 @@ class Entries // Try to create directory for new entry if (Filesystem::createDir($entry_dir)) { // Entry file path - $entry_file = $entry_dir . '/entry.json'; + $entry_file = $entry_dir . '/entry' . '.' . $driver; // Check if new entry file exists if (! Filesystem::has($entry_file)) {