From 48d15874752a5ea7bbe0c31ea13243792fcc2fd6 Mon Sep 17 00:00:00 2001 From: Awilum Date: Tue, 11 Aug 2020 19:42:17 +0300 Subject: [PATCH] refactor(entries): Rename path to id in Entries API #453 --- src/flextype/app/Foundation/Entries/Entries.php | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/flextype/app/Foundation/Entries/Entries.php b/src/flextype/app/Foundation/Entries/Entries.php index 6f96a28a..37549842 100755 --- a/src/flextype/app/Foundation/Entries/Entries.php +++ b/src/flextype/app/Foundation/Entries/Entries.php @@ -27,7 +27,7 @@ class Entries * @var string * @access public */ - public $entry_path = null; + public $entry_id = null; /** * Current entry data array @@ -67,7 +67,7 @@ class Entries * @var string * @access public */ - public $entries_path = null; + public $entries_id = null; /** * Flextype Dependency Container @@ -118,10 +118,10 @@ class Entries public function fetchSingle(string $id) : array { // Store current requested entry path - $this->entry_path = $id; + $this->entry_id = $id; // Get Cache ID for current requested entry - $entry_cache_id = $this->getCacheID($this->entry_path); + $entry_cache_id = $this->getCacheID($this->entry_id); // Try to get current requested entry from cache if ($this->flextype['cache']->contains($entry_cache_id)) { @@ -136,9 +136,9 @@ class Entries } // Try to get current requested entry from filesystem - if ($this->has($this->entry_path)) { + if ($this->has($this->entry_id)) { // Get entry file location - $entry_file = $this->getFileLocation($this->entry_path); + $entry_file = $this->getFileLocation($this->entry_id); // Try to get requested entry from the filesystem $entry_file_content = Filesystem::read($entry_file); @@ -185,10 +185,10 @@ class Entries $this->entries = []; // Store current requested entries path - $this->entries_path = $this->getDirLocation($id); + $this->entries_id = $this->getDirLocation($id); // Find entries - $entries_list = find_filter($this->entries_path, $filter); + $entries_list = find_filter($this->entries_id, $filter); // If entries founded in the entries folder // We are checking... Whether the requested entry is an a true entry.