1
0
mirror of https://github.com/flextype/flextype.git synced 2025-08-24 05:43:10 +02:00

Flextype Core: Add ability to work with different types of content #212 #186

This commit is contained in:
Awilum
2019-08-10 22:05:00 +03:00
parent f5d202c02a
commit 70eadd487e
2 changed files with 8 additions and 2 deletions

View File

@@ -376,7 +376,7 @@ class Entries
$entry_file = $this->_file_location($id);
if (Filesystem::has($entry_file)) {
return Filesystem::write($entry_file, JsonParser::encode($data));
return Filesystem::write($entry_file, Parser::encode($data));
}
return false;
@@ -403,7 +403,7 @@ class Entries
// Check if new entry file exists
if (! Filesystem::has($entry_file)) {
return Filesystem::write($entry_file, JsonParser::encode($data));
return Filesystem::write($entry_file, Parser::encode($data));
}
return false;

View File

@@ -18,6 +18,12 @@ class Parser
], 'yaml' => [
'name' => 'yaml',
'ext' => 'yaml',
], 'md' => [
'name' => 'md',
'ext' => 'md',
], 'toml' => [
'name' => 'toml',
'ext' => 'toml',
],
];