mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-01-31 09:06:17 +00:00
PhpDoc fixes
Signed-off-by: mark_story <mark@mark-story.com>
This commit is contained in:
parent
3ff9747d02
commit
86b76674d0
7 changed files with 35 additions and 42 deletions
|
@ -376,7 +376,7 @@ class Cache {
|
||||||
* Decrement a number under the key and return decremented value.
|
* Decrement a number under the key and return decremented value.
|
||||||
*
|
*
|
||||||
* @param string $key Identifier for the data
|
* @param string $key Identifier for the data
|
||||||
* @param integer $offset How much to substract
|
* @param integer $offset How much to subtract
|
||||||
* @param string $config Optional string configuration name. Defaults to 'default'
|
* @param string $config Optional string configuration name. Defaults to 'default'
|
||||||
* @return mixed new value, or false if the data doesn't exist, is not integer,
|
* @return mixed new value, or false if the data doesn't exist, is not integer,
|
||||||
* or if there was an error fetching it
|
* or if there was an error fetching it
|
||||||
|
@ -414,7 +414,7 @@ class Cache {
|
||||||
*
|
*
|
||||||
* @param string $key Identifier for the data
|
* @param string $key Identifier for the data
|
||||||
* @param string $config name of the configuration to use. Defaults to 'default'
|
* @param string $config name of the configuration to use. Defaults to 'default'
|
||||||
* @return boolean True if the value was succesfully deleted, false if it didn't exist or couldn't be removed
|
* @return boolean True if the value was successfully deleted, false if it didn't exist or couldn't be removed
|
||||||
*/
|
*/
|
||||||
public static function delete($key, $config = 'default') {
|
public static function delete($key, $config = 'default') {
|
||||||
$settings = self::settings($config);
|
$settings = self::settings($config);
|
||||||
|
@ -440,7 +440,7 @@ class Cache {
|
||||||
*
|
*
|
||||||
* @param boolean $check if true will check expiration, otherwise delete all
|
* @param boolean $check if true will check expiration, otherwise delete all
|
||||||
* @param string $config name of the configuration to use. Defaults to 'default'
|
* @param string $config name of the configuration to use. Defaults to 'default'
|
||||||
* @return boolean True if the cache was succesfully cleared, false otherwise
|
* @return boolean True if the cache was successfully cleared, false otherwise
|
||||||
*/
|
*/
|
||||||
public static function clear($check = false, $config = 'default') {
|
public static function clear($check = false, $config = 'default') {
|
||||||
if (!self::isInitialized($config)) {
|
if (!self::isInitialized($config)) {
|
||||||
|
@ -454,21 +454,20 @@ class Cache {
|
||||||
/**
|
/**
|
||||||
* Check if Cache has initialized a working config for the given name.
|
* Check if Cache has initialized a working config for the given name.
|
||||||
*
|
*
|
||||||
* @param string $engine Name of the engine, Defaults to default
|
* @param string $config name of the configuration to use. Defaults to 'default'
|
||||||
* @param string $config Name of the configuration setting
|
|
||||||
* @return bool Whether or not the config name has been initialized.
|
* @return bool Whether or not the config name has been initialized.
|
||||||
*/
|
*/
|
||||||
public static function isInitialized($name = 'default') {
|
public static function isInitialized($config = 'default') {
|
||||||
if (Configure::read('Cache.disable')) {
|
if (Configure::read('Cache.disable')) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
return isset(self::$_engines[$name]);
|
return isset(self::$_engines[$config]);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Return the settings for the named cache engine.
|
* Return the settings for the named cache engine.
|
||||||
*
|
*
|
||||||
* @param string $engine Name of the configuration to get settings for. Defaults to 'default'
|
* @param string $name Name of the configuration to get settings for. Defaults to 'default'
|
||||||
* @return array list of settings for this engine
|
* @return array list of settings for this engine
|
||||||
* @see Cache::config()
|
* @see Cache::config()
|
||||||
* @access public
|
* @access public
|
||||||
|
@ -502,8 +501,8 @@ abstract class CacheEngine {
|
||||||
*
|
*
|
||||||
* Called automatically by the cache frontend
|
* Called automatically by the cache frontend
|
||||||
*
|
*
|
||||||
* @param array $params Associative array of parameters for the engine
|
* @param array $settings Associative array of parameters for the engine
|
||||||
* @return boolean True if the engine has been succesfully initialized, false if not
|
* @return boolean True if the engine has been successfully initialized, false if not
|
||||||
*/
|
*/
|
||||||
public function init($settings = array()) {
|
public function init($settings = array()) {
|
||||||
$this->settings = array_merge(
|
$this->settings = array_merge(
|
||||||
|
@ -531,7 +530,7 @@ abstract class CacheEngine {
|
||||||
* @param string $key Identifier for the data
|
* @param string $key Identifier for the data
|
||||||
* @param mixed $value Data to be cached
|
* @param mixed $value Data to be cached
|
||||||
* @param mixed $duration How long to cache for.
|
* @param mixed $duration How long to cache for.
|
||||||
* @return boolean True if the data was succesfully cached, false on failure
|
* @return boolean True if the data was successfully cached, false on failure
|
||||||
*/
|
*/
|
||||||
abstract public function write($key, $value, $duration);
|
abstract public function write($key, $value, $duration);
|
||||||
|
|
||||||
|
@ -556,7 +555,7 @@ abstract class CacheEngine {
|
||||||
* Decrement a number under the key and return decremented value
|
* Decrement a number under the key and return decremented value
|
||||||
*
|
*
|
||||||
* @param string $key Identifier for the data
|
* @param string $key Identifier for the data
|
||||||
* @param integer $value How much to substract
|
* @param integer $offset How much to subtract
|
||||||
* @return New incremented value, false otherwise
|
* @return New incremented value, false otherwise
|
||||||
*/
|
*/
|
||||||
abstract public function decrement($key, $offset = 1);
|
abstract public function decrement($key, $offset = 1);
|
||||||
|
@ -565,7 +564,7 @@ abstract class CacheEngine {
|
||||||
* Delete a key from the cache
|
* Delete a key from the cache
|
||||||
*
|
*
|
||||||
* @param string $key Identifier for the data
|
* @param string $key Identifier for the data
|
||||||
* @return boolean True if the value was succesfully deleted, false if it didn't exist or couldn't be removed
|
* @return boolean True if the value was successfully deleted, false if it didn't exist or couldn't be removed
|
||||||
*/
|
*/
|
||||||
abstract public function delete($key);
|
abstract public function delete($key);
|
||||||
|
|
||||||
|
@ -573,7 +572,7 @@ abstract class CacheEngine {
|
||||||
* Delete all keys from the cache
|
* Delete all keys from the cache
|
||||||
*
|
*
|
||||||
* @param boolean $check if true will check expiration, otherwise delete all
|
* @param boolean $check if true will check expiration, otherwise delete all
|
||||||
* @return boolean True if the cache was succesfully cleared, false otherwise
|
* @return boolean True if the cache was successfully cleared, false otherwise
|
||||||
*/
|
*/
|
||||||
abstract public function clear($check);
|
abstract public function clear($check);
|
||||||
|
|
||||||
|
|
|
@ -31,7 +31,7 @@ class ApcEngine extends CacheEngine {
|
||||||
* Called automatically by the cache frontend
|
* Called automatically by the cache frontend
|
||||||
* To reinitialize the settings call Cache::engine('EngineName', [optional] settings = array());
|
* To reinitialize the settings call Cache::engine('EngineName', [optional] settings = array());
|
||||||
*
|
*
|
||||||
* @param array $setting array of setting for the engine
|
* @param array $settings array of setting for the engine
|
||||||
* @return boolean True if the engine has been successfully initialized, false if not
|
* @return boolean True if the engine has been successfully initialized, false if not
|
||||||
* @see CacheEngine::__defaults
|
* @see CacheEngine::__defaults
|
||||||
*/
|
*/
|
||||||
|
@ -46,7 +46,7 @@ class ApcEngine extends CacheEngine {
|
||||||
* @param string $key Identifier for the data
|
* @param string $key Identifier for the data
|
||||||
* @param mixed $value Data to be cached
|
* @param mixed $value Data to be cached
|
||||||
* @param integer $duration How long to cache the data, in seconds
|
* @param integer $duration How long to cache the data, in seconds
|
||||||
* @return boolean True if the data was succesfully cached, false on failure
|
* @return boolean True if the data was successfully cached, false on failure
|
||||||
*/
|
*/
|
||||||
public function write($key, $value, $duration) {
|
public function write($key, $value, $duration) {
|
||||||
$expires = time() + $duration;
|
$expires = time() + $duration;
|
||||||
|
@ -74,7 +74,6 @@ class ApcEngine extends CacheEngine {
|
||||||
*
|
*
|
||||||
* @param string $key Identifier for the data
|
* @param string $key Identifier for the data
|
||||||
* @param integer $offset How much to increment
|
* @param integer $offset How much to increment
|
||||||
* @param integer $duration How long to cache the data, in seconds
|
|
||||||
* @return New incremented value, false otherwise
|
* @return New incremented value, false otherwise
|
||||||
*/
|
*/
|
||||||
public function increment($key, $offset = 1) {
|
public function increment($key, $offset = 1) {
|
||||||
|
@ -85,8 +84,7 @@ class ApcEngine extends CacheEngine {
|
||||||
* Decrements the value of an integer cached key
|
* Decrements the value of an integer cached key
|
||||||
*
|
*
|
||||||
* @param string $key Identifier for the data
|
* @param string $key Identifier for the data
|
||||||
* @param integer $offset How much to substract
|
* @param integer $offset How much to subtract
|
||||||
* @param integer $duration How long to cache the data, in seconds
|
|
||||||
* @return New decremented value, false otherwise
|
* @return New decremented value, false otherwise
|
||||||
*/
|
*/
|
||||||
public function decrement($key, $offset = 1) {
|
public function decrement($key, $offset = 1) {
|
||||||
|
@ -97,7 +95,7 @@ class ApcEngine extends CacheEngine {
|
||||||
* Delete a key from the cache
|
* Delete a key from the cache
|
||||||
*
|
*
|
||||||
* @param string $key Identifier for the data
|
* @param string $key Identifier for the data
|
||||||
* @return boolean True if the value was succesfully deleted, false if it didn't exist or couldn't be removed
|
* @return boolean True if the value was successfully deleted, false if it didn't exist or couldn't be removed
|
||||||
*/
|
*/
|
||||||
public function delete($key) {
|
public function delete($key) {
|
||||||
return apc_delete($key);
|
return apc_delete($key);
|
||||||
|
@ -106,7 +104,7 @@ class ApcEngine extends CacheEngine {
|
||||||
/**
|
/**
|
||||||
* Delete all keys from the cache. This will clear every cache config using APC.
|
* Delete all keys from the cache. This will clear every cache config using APC.
|
||||||
*
|
*
|
||||||
* @return boolean True if the cache was succesfully cleared, false otherwise
|
* @return boolean True if the cache was successfully cleared, false otherwise
|
||||||
*/
|
*/
|
||||||
public function clear($check) {
|
public function clear($check) {
|
||||||
return apc_clear_cache('user');
|
return apc_clear_cache('user');
|
||||||
|
|
|
@ -63,7 +63,7 @@ class FileEngine extends CacheEngine {
|
||||||
* Called automatically by the cache frontend
|
* Called automatically by the cache frontend
|
||||||
* To reinitialize the settings call Cache::engine('EngineName', [optional] settings = array());
|
* To reinitialize the settings call Cache::engine('EngineName', [optional] settings = array());
|
||||||
*
|
*
|
||||||
* @param array $setting array of setting for the engine
|
* @param array $settings array of setting for the engine
|
||||||
* @return boolean True if the engine has been successfully initialized, false if not
|
* @return boolean True if the engine has been successfully initialized, false if not
|
||||||
*/
|
*/
|
||||||
public function init($settings = array()) {
|
public function init($settings = array()) {
|
||||||
|
@ -99,7 +99,7 @@ class FileEngine extends CacheEngine {
|
||||||
* @param string $key Identifier for the data
|
* @param string $key Identifier for the data
|
||||||
* @param mixed $data Data to be cached
|
* @param mixed $data Data to be cached
|
||||||
* @param mixed $duration How long to cache the data, in seconds
|
* @param mixed $duration How long to cache the data, in seconds
|
||||||
* @return boolean True if the data was succesfully cached, false on failure
|
* @return boolean True if the data was successfully cached, false on failure
|
||||||
*/
|
*/
|
||||||
public function write($key, $data, $duration) {
|
public function write($key, $data, $duration) {
|
||||||
if ($data === '' || !$this->_init) {
|
if ($data === '' || !$this->_init) {
|
||||||
|
@ -204,7 +204,7 @@ class FileEngine extends CacheEngine {
|
||||||
* Delete all values from the cache
|
* Delete all values from the cache
|
||||||
*
|
*
|
||||||
* @param boolean $check Optional - only delete expired cache items
|
* @param boolean $check Optional - only delete expired cache items
|
||||||
* @return boolean True if the cache was succesfully cleared, false otherwise
|
* @return boolean True if the cache was successfully cleared, false otherwise
|
||||||
*/
|
*/
|
||||||
public function clear($check) {
|
public function clear($check) {
|
||||||
if (!$this->_init) {
|
if (!$this->_init) {
|
||||||
|
|
|
@ -53,7 +53,7 @@ class MemcacheEngine extends CacheEngine {
|
||||||
* Called automatically by the cache frontend
|
* Called automatically by the cache frontend
|
||||||
* To reinitialize the settings call Cache::engine('EngineName', [optional] settings = array());
|
* To reinitialize the settings call Cache::engine('EngineName', [optional] settings = array());
|
||||||
*
|
*
|
||||||
* @param array $setting array of setting for the engine
|
* @param array $settings array of setting for the engine
|
||||||
* @return boolean True if the engine has been successfully initialized, false if not
|
* @return boolean True if the engine has been successfully initialized, false if not
|
||||||
*/
|
*/
|
||||||
public function init($settings = array()) {
|
public function init($settings = array()) {
|
||||||
|
@ -121,7 +121,7 @@ class MemcacheEngine extends CacheEngine {
|
||||||
* @param string $key Identifier for the data
|
* @param string $key Identifier for the data
|
||||||
* @param mixed $value Data to be cached
|
* @param mixed $value Data to be cached
|
||||||
* @param integer $duration How long to cache the data, in seconds
|
* @param integer $duration How long to cache the data, in seconds
|
||||||
* @return boolean True if the data was succesfully cached, false on failure
|
* @return boolean True if the data was successfully cached, false on failure
|
||||||
* @see http://php.net/manual/en/memcache.set.php
|
* @see http://php.net/manual/en/memcache.set.php
|
||||||
*/
|
*/
|
||||||
public function write($key, $value, $duration) {
|
public function write($key, $value, $duration) {
|
||||||
|
@ -146,7 +146,6 @@ class MemcacheEngine extends CacheEngine {
|
||||||
*
|
*
|
||||||
* @param string $key Identifier for the data
|
* @param string $key Identifier for the data
|
||||||
* @param integer $offset How much to increment
|
* @param integer $offset How much to increment
|
||||||
* @param integer $duration How long to cache the data, in seconds
|
|
||||||
* @return New incremented value, false otherwise
|
* @return New incremented value, false otherwise
|
||||||
* @throws CacheException when you try to increment with compress = true
|
* @throws CacheException when you try to increment with compress = true
|
||||||
*/
|
*/
|
||||||
|
@ -163,8 +162,7 @@ class MemcacheEngine extends CacheEngine {
|
||||||
* Decrements the value of an integer cached key
|
* Decrements the value of an integer cached key
|
||||||
*
|
*
|
||||||
* @param string $key Identifier for the data
|
* @param string $key Identifier for the data
|
||||||
* @param integer $offset How much to substract
|
* @param integer $offset How much to subtract
|
||||||
* @param integer $duration How long to cache the data, in seconds
|
|
||||||
* @return New decremented value, false otherwise
|
* @return New decremented value, false otherwise
|
||||||
* @throws CacheException when you try to decrement with compress = true
|
* @throws CacheException when you try to decrement with compress = true
|
||||||
*/
|
*/
|
||||||
|
@ -181,7 +179,7 @@ class MemcacheEngine extends CacheEngine {
|
||||||
* Delete a key from the cache
|
* Delete a key from the cache
|
||||||
*
|
*
|
||||||
* @param string $key Identifier for the data
|
* @param string $key Identifier for the data
|
||||||
* @return boolean True if the value was succesfully deleted, false if it didn't exist or couldn't be removed
|
* @return boolean True if the value was successfully deleted, false if it didn't exist or couldn't be removed
|
||||||
*/
|
*/
|
||||||
public function delete($key) {
|
public function delete($key) {
|
||||||
return $this->_Memcache->delete($key);
|
return $this->_Memcache->delete($key);
|
||||||
|
@ -190,7 +188,7 @@ class MemcacheEngine extends CacheEngine {
|
||||||
/**
|
/**
|
||||||
* Delete all keys from the cache
|
* Delete all keys from the cache
|
||||||
*
|
*
|
||||||
* @return boolean True if the cache was succesfully cleared, false otherwise
|
* @return boolean True if the cache was successfully cleared, false otherwise
|
||||||
*/
|
*/
|
||||||
public function clear($check) {
|
public function clear($check) {
|
||||||
return $this->_Memcache->flush();
|
return $this->_Memcache->flush();
|
||||||
|
|
|
@ -42,7 +42,7 @@ class XcacheEngine extends CacheEngine {
|
||||||
* Called automatically by the cache frontend
|
* Called automatically by the cache frontend
|
||||||
* To reinitialize the settings call Cache::engine('EngineName', [optional] settings = array());
|
* To reinitialize the settings call Cache::engine('EngineName', [optional] settings = array());
|
||||||
*
|
*
|
||||||
* @param array $setting array of setting for the engine
|
* @param array $settings array of setting for the engine
|
||||||
* @return boolean True if the engine has been successfully initialized, false if not
|
* @return boolean True if the engine has been successfully initialized, false if not
|
||||||
*/
|
*/
|
||||||
public function init($settings) {
|
public function init($settings) {
|
||||||
|
@ -62,7 +62,7 @@ class XcacheEngine extends CacheEngine {
|
||||||
* @param string $key Identifier for the data
|
* @param string $key Identifier for the data
|
||||||
* @param mixed $value Data to be cached
|
* @param mixed $value Data to be cached
|
||||||
* @param integer $duration How long to cache the data, in seconds
|
* @param integer $duration How long to cache the data, in seconds
|
||||||
* @return boolean True if the data was succesfully cached, false on failure
|
* @return boolean True if the data was successfully cached, false on failure
|
||||||
*/
|
*/
|
||||||
public function write($key, $value, $duration) {
|
public function write($key, $value, $duration) {
|
||||||
$expires = time() + $duration;
|
$expires = time() + $duration;
|
||||||
|
@ -94,7 +94,6 @@ class XcacheEngine extends CacheEngine {
|
||||||
*
|
*
|
||||||
* @param string $key Identifier for the data
|
* @param string $key Identifier for the data
|
||||||
* @param integer $offset How much to increment
|
* @param integer $offset How much to increment
|
||||||
* @param integer $duration How long to cache the data, in seconds
|
|
||||||
* @return New incremented value, false otherwise
|
* @return New incremented value, false otherwise
|
||||||
*/
|
*/
|
||||||
public function increment($key, $offset = 1) {
|
public function increment($key, $offset = 1) {
|
||||||
|
@ -106,8 +105,7 @@ class XcacheEngine extends CacheEngine {
|
||||||
* If the cache key is not an integer it will be treated as 0
|
* If the cache key is not an integer it will be treated as 0
|
||||||
*
|
*
|
||||||
* @param string $key Identifier for the data
|
* @param string $key Identifier for the data
|
||||||
* @param integer $offset How much to substract
|
* @param integer $offset How much to subtract
|
||||||
* @param integer $duration How long to cache the data, in seconds
|
|
||||||
* @return New decremented value, false otherwise
|
* @return New decremented value, false otherwise
|
||||||
*/
|
*/
|
||||||
public function decrement($key, $offset = 1) {
|
public function decrement($key, $offset = 1) {
|
||||||
|
@ -117,7 +115,7 @@ class XcacheEngine extends CacheEngine {
|
||||||
* Delete a key from the cache
|
* Delete a key from the cache
|
||||||
*
|
*
|
||||||
* @param string $key Identifier for the data
|
* @param string $key Identifier for the data
|
||||||
* @return boolean True if the value was succesfully deleted, false if it didn't exist or couldn't be removed
|
* @return boolean True if the value was successfully deleted, false if it didn't exist or couldn't be removed
|
||||||
*/
|
*/
|
||||||
public function delete($key) {
|
public function delete($key) {
|
||||||
return xcache_unset($key);
|
return xcache_unset($key);
|
||||||
|
@ -126,7 +124,7 @@ class XcacheEngine extends CacheEngine {
|
||||||
/**
|
/**
|
||||||
* Delete all keys from the cache
|
* Delete all keys from the cache
|
||||||
*
|
*
|
||||||
* @return boolean True if the cache was succesfully cleared, false otherwise
|
* @return boolean True if the cache was successfully cleared, false otherwise
|
||||||
*/
|
*/
|
||||||
public function clear($check) {
|
public function clear($check) {
|
||||||
$this->__auth();
|
$this->__auth();
|
||||||
|
@ -145,7 +143,7 @@ class XcacheEngine extends CacheEngine {
|
||||||
* This has to be done because xcache_clear_cache() needs to pass Basic Http Auth
|
* This has to be done because xcache_clear_cache() needs to pass Basic Http Auth
|
||||||
* (see xcache.admin configuration settings)
|
* (see xcache.admin configuration settings)
|
||||||
*
|
*
|
||||||
* @param boolean Revert changes
|
* @param boolean $reverse Revert changes
|
||||||
* @access private
|
* @access private
|
||||||
*/
|
*/
|
||||||
function __auth($reverse = false) {
|
function __auth($reverse = false) {
|
||||||
|
|
|
@ -32,7 +32,7 @@ class ComponentCollection extends ObjectCollection {
|
||||||
* Initializes all the Components for a controller.
|
* Initializes all the Components for a controller.
|
||||||
* Attaches a reference of each component to the Controller.
|
* Attaches a reference of each component to the Controller.
|
||||||
*
|
*
|
||||||
* @param Controller $controller Controller to initialize components for.
|
* @param Controller $Controller Controller to initialize components for.
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function init(Controller $Controller) {
|
public function init(Controller $Controller) {
|
||||||
|
|
|
@ -353,7 +353,7 @@ class Controller extends Object {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Provides backwards compatbility access to the request object properties.
|
* Provides backwards compatibility access to the request object properties.
|
||||||
* Also provides the params alias.
|
* Also provides the params alias.
|
||||||
*
|
*
|
||||||
* @return void
|
* @return void
|
||||||
|
@ -376,7 +376,7 @@ class Controller extends Object {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Provides backwards compatiblity access for setting values to the request object.
|
* Provides backwards compatibility access for setting values to the request object.
|
||||||
*
|
*
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
|
|
Loading…
Add table
Reference in a new issue