diff --git a/flextype/Cache.php b/flextype/Cache.php index 803fa039..a6192c11 100755 --- a/flextype/Cache.php +++ b/flextype/Cache.php @@ -51,9 +51,9 @@ class Cache private $driver; /** - * Private construct method to enforce singleton behavior. + * Constructor * - * @access private + * @access public */ public function __construct($flextype) { @@ -75,7 +75,6 @@ class Cache $this->driver->setNamespace($this->key); } - /** * Get Cache Driver * @@ -291,7 +290,7 @@ class Cache */ public function driver() { - return $this->$driver; + return $this->driver; } /** @@ -302,7 +301,7 @@ class Cache */ public function getKey() : string { - return $this->$key; + return $this->key; } /** @@ -315,7 +314,7 @@ class Cache public function fetch(string $id) { if ($this->flextype['registry']->get('settings.cache.enabled')) { - return $this->$driver->fetch($id); + return $this->driver->fetch($id); } else { return false; } @@ -330,7 +329,7 @@ class Cache public function contains($id) { if ($this->flextype['registry']->get('settings.cache.enabled')) { - return $this->$driver->contains(($id)); + return $this->driver->contains($id); } else { return false; } @@ -352,7 +351,7 @@ class Cache if ($lifetime === null) { $lifetime = $this->getLifetime(); } - $this->$driver->save($id, $data, $lifetime); + $this->driver->save($id, $data, $lifetime); } } @@ -384,10 +383,10 @@ class Cache return; } - $interval = $future-$this->$now; + $interval = $future-$this->now; if ($interval > 0 && $interval < $this->getLifetime()) { - $this->$lifetime = $interval; + $this->lifetime = $interval; } } @@ -399,10 +398,10 @@ class Cache */ public function getLifetime() { - if ($this->$lifetime === null) { - $this->$lifetime = $this->flextype['registry']->get('settings.cache.lifetime') ?: 604800; + if ($this->lifetime === null) { + $this->lifetime = $this->flextype['registry']->get('settings.cache.lifetime') ?: 604800; } - return $this->$lifetime; + return $this->lifetime; } } diff --git a/flextype/Entries.php b/flextype/Entries.php index d9820b4e..e3b600af 100755 --- a/flextype/Entries.php +++ b/flextype/Entries.php @@ -23,7 +23,9 @@ class Entries private $flextype; /** - * __construct + * Constructor + * + * @access public */ public function __construct($flextype) { diff --git a/flextype/Fieldsets.php b/flextype/Fieldsets.php index b4eaba87..9dd9b650 100644 --- a/flextype/Fieldsets.php +++ b/flextype/Fieldsets.php @@ -22,7 +22,7 @@ class Fieldsets private $flextype; /** - * __construct + * Constructor * * @access public */ diff --git a/flextype/Plugins.php b/flextype/Plugins.php index 07c09cf8..21654cc4 100755 --- a/flextype/Plugins.php +++ b/flextype/Plugins.php @@ -30,7 +30,7 @@ class Plugins private $locales = []; /** - * __construct + * Constructor * * @access public */ diff --git a/flextype/Snippets.php b/flextype/Snippets.php index c3b3dca5..a12b730d 100644 --- a/flextype/Snippets.php +++ b/flextype/Snippets.php @@ -22,7 +22,9 @@ class Snippets private $flextype; /** - * __construct + * Constructor + * + * @access public */ public function __construct($flextype) { @@ -32,8 +34,6 @@ class Snippets /** * Get snippet * - * $this->fetch('snippet-name'); - * * @access public * @param string $snippet_name Snippet name * @return string|bool Returns the contents of the output buffer and end output buffering.