mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-01-18 18:46:17 +00:00
Correcting @return bool
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@5857 3807eeeb-6ff5-0310-8944-8be069107fe0
This commit is contained in:
parent
190997988f
commit
da97a5c871
61 changed files with 255 additions and 255 deletions
|
@ -136,7 +136,7 @@
|
|||
* from a plugin, e.g: plugin.MyView
|
||||
*
|
||||
* @param string $viewClass Name of the view class to load (camelized)
|
||||
* @return bool Success
|
||||
* @return boolean Success
|
||||
*/
|
||||
function loadView($viewClass) {
|
||||
if (strpos($viewClass, '.') !== false) {
|
||||
|
@ -175,7 +175,7 @@
|
|||
* to load a model located inside a plugin folder.
|
||||
*
|
||||
* @param $name Name of model to load
|
||||
* @return bool Success
|
||||
* @return boolean Success
|
||||
*/
|
||||
function loadModel($name = null) {
|
||||
if (!class_exists('Model')) {
|
||||
|
@ -326,7 +326,7 @@
|
|||
* Loads a controller and its helper libraries.
|
||||
*
|
||||
* @param string $name Name of controller
|
||||
* @return bool Success
|
||||
* @return boolean Success
|
||||
*/
|
||||
function loadController($name) {
|
||||
if (!class_exists('AppController')) {
|
||||
|
@ -424,7 +424,7 @@
|
|||
*
|
||||
* @param string $plugin Name of plugin
|
||||
* @param string $controller Name of controller to load
|
||||
* @return bool Success
|
||||
* @return boolean Success
|
||||
* @deprecated
|
||||
*/
|
||||
function loadPluginController($plugin, $controller) {
|
||||
|
@ -470,7 +470,7 @@
|
|||
* Loads a helper
|
||||
*
|
||||
* @param string $name Name of helper
|
||||
* @return bool Success
|
||||
* @return boolean Success
|
||||
*/
|
||||
function loadHelper($name) {
|
||||
if (!class_exists('AppHelper')) {
|
||||
|
@ -531,7 +531,7 @@
|
|||
*
|
||||
* @param string $plugin Name of plugin
|
||||
* @param string $helper Name of helper to load
|
||||
* @return bool Success
|
||||
* @return boolean Success
|
||||
* @deprecated
|
||||
*/
|
||||
function loadPluginHelper($plugin, $helper) {
|
||||
|
@ -553,7 +553,7 @@
|
|||
* Loads a component
|
||||
*
|
||||
* @param string $name Name of component
|
||||
* @return bool Success
|
||||
* @return boolean Success
|
||||
*/
|
||||
function loadComponent($name) {
|
||||
if ($name === null) {
|
||||
|
@ -605,7 +605,7 @@
|
|||
*
|
||||
* @param string $plugin Name of plugin
|
||||
* @param string $helper Name of component to load
|
||||
* @return bool Success
|
||||
* @return boolean Success
|
||||
* @deprecated
|
||||
*/
|
||||
function loadPluginComponent($plugin, $component) {
|
||||
|
@ -625,7 +625,7 @@
|
|||
* Loads a behavior
|
||||
*
|
||||
* @param string $name Name of behavior
|
||||
* @return bool Success
|
||||
* @return boolean Success
|
||||
*/
|
||||
function loadBehavior($name) {
|
||||
if ($name === null) {
|
||||
|
@ -683,7 +683,7 @@
|
|||
* config('config1', 'config2');
|
||||
* </code>
|
||||
*
|
||||
* @return bool Success
|
||||
* @return boolean Success
|
||||
*/
|
||||
function config() {
|
||||
$args = func_get_args();
|
||||
|
@ -1091,7 +1091,7 @@
|
|||
*
|
||||
* @param string $fileName File name.
|
||||
* @param mixed $data String or array.
|
||||
* @return bool Success
|
||||
* @return boolean Success
|
||||
*/
|
||||
function file_put_contents($fileName, $data) {
|
||||
if (is_array($data)) {
|
||||
|
|
|
@ -196,7 +196,7 @@ class ShellDispatcher {
|
|||
/**
|
||||
* Initializes the environment and loads the Cake core.
|
||||
*
|
||||
* @return bool Success.
|
||||
* @return boolean Success.
|
||||
* @access private
|
||||
*/
|
||||
function __bootstrap() {
|
||||
|
@ -440,7 +440,7 @@ class ShellDispatcher {
|
|||
/**
|
||||
* Removes first argument and shifts other arguments up
|
||||
*
|
||||
* @return bool False if there are no arguments
|
||||
* @return boolean False if there are no arguments
|
||||
* @access public
|
||||
*/
|
||||
function shiftArgs() {
|
||||
|
|
|
@ -453,7 +453,7 @@ class AclShell extends Shell {
|
|||
*
|
||||
* @param string $type Node type (ARO/ACO)
|
||||
* @param int $id Node id
|
||||
* @return bool Success
|
||||
* @return boolean Success
|
||||
* @access public
|
||||
*/
|
||||
function nodeExists() {
|
||||
|
|
|
@ -259,7 +259,7 @@ class ConsoleShell extends Shell {
|
|||
* Tells if the specified model is included in the list of available models
|
||||
*
|
||||
* @param string $modelToCheck
|
||||
* @return bool true if is an available model, false otherwise
|
||||
* @return boolean true if is an available model, false otherwise
|
||||
* @access private
|
||||
*/
|
||||
function __isValidModel($modelToCheck) {
|
||||
|
|
|
@ -412,7 +412,7 @@ class Shell extends Object {
|
|||
*
|
||||
* @param string $path Where to put the file.
|
||||
* @param string $contents Content to put in the file.
|
||||
* @return bool Success
|
||||
* @return boolean Success
|
||||
* @access public
|
||||
*/
|
||||
function createFile ($path, $contents) {
|
||||
|
@ -457,7 +457,7 @@ class Shell extends Object {
|
|||
/**
|
||||
* Action to create a Unit Test
|
||||
*
|
||||
* @return bool Success
|
||||
* @return boolean Success
|
||||
* @access protected
|
||||
*/
|
||||
function _checkUnitTest() {
|
||||
|
|
|
@ -174,7 +174,7 @@ class DbConfigTask extends Shell {
|
|||
/**
|
||||
* Output verification message and bake if it looks good
|
||||
*
|
||||
* @return bool True if user says it looks good, false otherwise
|
||||
* @return boolean True if user says it looks good, false otherwise
|
||||
* @access private
|
||||
*/
|
||||
function __verify($config) {
|
||||
|
@ -207,7 +207,7 @@ class DbConfigTask extends Shell {
|
|||
* Assembles and writes database.php
|
||||
*
|
||||
* @param array $configs Configuration settings to use
|
||||
* @return bool Success
|
||||
* @return boolean Success
|
||||
* @access public
|
||||
*/
|
||||
function bake($configs) {
|
||||
|
|
|
@ -207,7 +207,7 @@ class ProjectTask extends Shell {
|
|||
* Writes a file with a default home page to the project.
|
||||
*
|
||||
* @param string $dir Path to project
|
||||
* @return bool Success
|
||||
* @return boolean Success
|
||||
* @access public
|
||||
*/
|
||||
function createHome($dir) {
|
||||
|
@ -219,7 +219,7 @@ class ProjectTask extends Shell {
|
|||
* Generates and writes 'Security.salt'
|
||||
*
|
||||
* @param string $path Project path
|
||||
* @return bool Success
|
||||
* @return boolean Success
|
||||
* @access public
|
||||
*/
|
||||
function securitySalt($path) {
|
||||
|
@ -242,7 +242,7 @@ class ProjectTask extends Shell {
|
|||
* Generates and writes CAKE_CORE_INCLUDE_PATH
|
||||
*
|
||||
* @param string $path Project path
|
||||
* @return bool Success
|
||||
* @return boolean Success
|
||||
* @access public
|
||||
*/
|
||||
function corePath($path) {
|
||||
|
@ -265,7 +265,7 @@ class ProjectTask extends Shell {
|
|||
* Enables Configure::read('Routing.admin') in /app/config/core.php
|
||||
*
|
||||
* @param string $name Name to use as admin routing
|
||||
* @return bool Success
|
||||
* @return boolean Success
|
||||
* @access public
|
||||
*/
|
||||
function cakeAdmin($name) {
|
||||
|
|
|
@ -259,7 +259,7 @@ class ViewTask extends Shell {
|
|||
*
|
||||
* @param string $action Action to bake
|
||||
* @param string $content Content to write
|
||||
* @return bool Success
|
||||
* @return boolean Success
|
||||
* @access public
|
||||
*/
|
||||
function bake($action, $content = '') {
|
||||
|
|
|
@ -111,7 +111,7 @@ class Dispatcher extends Object {
|
|||
*
|
||||
* @param string $url URL information to work on
|
||||
* @param array $additionalParams Settings array ("bare", "return") which is melded with the GET and POST params
|
||||
* @return bool Success
|
||||
* @return boolean Success
|
||||
* @access public
|
||||
*/
|
||||
function dispatch($url = null, $additionalParams = array()) {
|
||||
|
|
|
@ -136,7 +136,7 @@ class Cache extends Object {
|
|||
*
|
||||
* @param string $name Name of the engine (without 'Engine')
|
||||
* @param array $settings Optional associative array of settings passed to the engine
|
||||
* @return bool True on success, false on failure
|
||||
* @return boolean True on success, false on failure
|
||||
* @access public
|
||||
*/
|
||||
function engine($name = 'File', $settings = array()) {
|
||||
|
@ -169,7 +169,7 @@ class Cache extends Object {
|
|||
* @param mixed $value Data to be cached - anything except a resource
|
||||
* @param mixed $duration Optional - string configuration name OR how long to cache the data, either in seconds or a
|
||||
* string that can be parsed by the strtotime() function OR array('config' => 'default', 'duration' => '3600')
|
||||
* @return bool True if the data was successfully cached, false on failure
|
||||
* @return boolean True if the data was successfully cached, false on failure
|
||||
* @access public
|
||||
*/
|
||||
function write($key, $value, $duration = null) {
|
||||
|
@ -237,7 +237,7 @@ class Cache extends Object {
|
|||
*
|
||||
* @param string $key Identifier for the data
|
||||
* @param string $config name of the configuration to use
|
||||
* @return bool 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 succesfully deleted, false if it didn't exist or couldn't be removed
|
||||
* @access public
|
||||
*/
|
||||
function delete($key, $config = null) {
|
||||
|
@ -262,7 +262,7 @@ class Cache extends Object {
|
|||
*
|
||||
* @param bool $check if true will check expiration, otherwise delete all
|
||||
* @param string $config name of the configuration to use
|
||||
* @return bool True if the cache was succesfully cleared, false otherwise
|
||||
* @return boolean True if the cache was succesfully cleared, false otherwise
|
||||
* @access public
|
||||
*/
|
||||
function clear($check = false, $config = null) {
|
||||
|
@ -335,7 +335,7 @@ class CacheEngine extends Object {
|
|||
* Called automatically by the cache frontend
|
||||
*
|
||||
* @param array $params Associative array of parameters for the engine
|
||||
* @return bool True if the engine has been succesfully initialized, false if not
|
||||
* @return boolean True if the engine has been succesfully initialized, false if not
|
||||
* @access public
|
||||
*/
|
||||
function init($settings = array()) {
|
||||
|
@ -357,7 +357,7 @@ class CacheEngine extends Object {
|
|||
* @param string $key Identifier for the data
|
||||
* @param mixed $value Data to be cached
|
||||
* @param mixed $duration How long to cache the data, in seconds
|
||||
* @return bool True if the data was succesfully cached, false on failure
|
||||
* @return boolean True if the data was succesfully cached, false on failure
|
||||
* @access public
|
||||
*/
|
||||
function write($key, &$value, $duration) {
|
||||
|
@ -377,7 +377,7 @@ class CacheEngine extends Object {
|
|||
* Delete a key from the cache
|
||||
*
|
||||
* @param string $key Identifier for the data
|
||||
* @return bool 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 succesfully deleted, false if it didn't exist or couldn't be removed
|
||||
* @access public
|
||||
*/
|
||||
function delete($key) {
|
||||
|
@ -386,7 +386,7 @@ class CacheEngine extends Object {
|
|||
* Delete all keys from the cache
|
||||
*
|
||||
* @param bool $check if true will check expiration, otherwise delete all
|
||||
* @return bool True if the cache was succesfully cleared, false otherwise
|
||||
* @return boolean True if the cache was succesfully cleared, false otherwise
|
||||
* @access public
|
||||
*/
|
||||
function clear($check) {
|
||||
|
|
8
cake/libs/cache/apc.php
vendored
8
cake/libs/cache/apc.php
vendored
|
@ -39,7 +39,7 @@ class APCEngine extends CacheEngine {
|
|||
* To reinitialize the settings call Cache::engine('EngineName', [optional] settings = array());
|
||||
*
|
||||
* @param array $setting array of setting for the engine
|
||||
* @return bool 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
|
||||
* @access public
|
||||
*/
|
||||
|
@ -53,7 +53,7 @@ class APCEngine extends CacheEngine {
|
|||
* @param string $key Identifier for the data
|
||||
* @param mixed $value Data to be cached
|
||||
* @param int $duration How long to cache the data, in seconds
|
||||
* @return bool True if the data was succesfully cached, false on failure
|
||||
* @return boolean True if the data was succesfully cached, false on failure
|
||||
* @access public
|
||||
*/
|
||||
function write($key, &$value, $duration) {
|
||||
|
@ -73,7 +73,7 @@ class APCEngine extends CacheEngine {
|
|||
* Delete a key from the cache
|
||||
*
|
||||
* @param string $key Identifier for the data
|
||||
* @return bool 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 succesfully deleted, false if it didn't exist or couldn't be removed
|
||||
* @access public
|
||||
*/
|
||||
function delete($key) {
|
||||
|
@ -82,7 +82,7 @@ class APCEngine extends CacheEngine {
|
|||
/**
|
||||
* Delete all keys from the cache
|
||||
*
|
||||
* @return bool True if the cache was succesfully cleared, false otherwise
|
||||
* @return boolean True if the cache was succesfully cleared, false otherwise
|
||||
* @access public
|
||||
*/
|
||||
function clear() {
|
||||
|
|
10
cake/libs/cache/file.php
vendored
10
cake/libs/cache/file.php
vendored
|
@ -66,7 +66,7 @@ class FileEngine extends CacheEngine {
|
|||
* To reinitialize the settings call Cache::engine('EngineName', [optional] settings = array());
|
||||
*
|
||||
* @param array $setting array of setting for the engine
|
||||
* @return bool True if the engine has been successfully initialized, false if not
|
||||
* @return boolean True if the engine has been successfully initialized, false if not
|
||||
* @access public
|
||||
*/
|
||||
function init($settings = array()) {
|
||||
|
@ -86,7 +86,7 @@ class FileEngine extends CacheEngine {
|
|||
/**
|
||||
* Garbage collection. Permanently remove all expired and deleted data
|
||||
*
|
||||
* @return bool True if garbage collection was succesful, false on failure
|
||||
* @return boolean True if garbage collection was succesful, false on failure
|
||||
* @access public
|
||||
*/
|
||||
function gc() {
|
||||
|
@ -98,7 +98,7 @@ class FileEngine extends CacheEngine {
|
|||
* @param string $key Identifier for the data
|
||||
* @param mixed $data Data to be cached
|
||||
* @param mixed $duration How long to cache the data, in seconds
|
||||
* @return bool True if the data was succesfully cached, false on failure
|
||||
* @return boolean True if the data was succesfully cached, false on failure
|
||||
* @access public
|
||||
*/
|
||||
function write($key, &$data, $duration) {
|
||||
|
@ -161,7 +161,7 @@ class FileEngine extends CacheEngine {
|
|||
* Delete a key from the cache
|
||||
*
|
||||
* @param string $key Identifier for the data
|
||||
* @return bool True if the value was successfully 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
|
||||
* @access public
|
||||
*/
|
||||
function delete($key) {
|
||||
|
@ -174,7 +174,7 @@ class FileEngine extends CacheEngine {
|
|||
* Delete all values from the cache
|
||||
*
|
||||
* @param bool $check Optional - only delete expired cache items
|
||||
* @return bool True if the cache was succesfully cleared, false otherwise
|
||||
* @return boolean True if the cache was succesfully cleared, false otherwise
|
||||
* @access public
|
||||
*/
|
||||
function clear($check) {
|
||||
|
|
10
cake/libs/cache/memcache.php
vendored
10
cake/libs/cache/memcache.php
vendored
|
@ -55,7 +55,7 @@ class MemcacheEngine extends CacheEngine {
|
|||
* To reinitialize the settings call Cache::engine('EngineName', [optional] settings = array());
|
||||
*
|
||||
* @param array $setting array of setting for the engine
|
||||
* @return bool True if the engine has been successfully initialized, false if not
|
||||
* @return boolean True if the engine has been successfully initialized, false if not
|
||||
* @access public
|
||||
*/
|
||||
function init($settings = array()) {
|
||||
|
@ -94,7 +94,7 @@ class MemcacheEngine extends CacheEngine {
|
|||
* @param string $key Identifier for the data
|
||||
* @param mixed $value Data to be cached
|
||||
* @param int $duration How long to cache the data, in seconds
|
||||
* @return bool True if the data was succesfully cached, false on failure
|
||||
* @return boolean True if the data was succesfully cached, false on failure
|
||||
* @access public
|
||||
*/
|
||||
function write($key, &$value, $duration) {
|
||||
|
@ -114,7 +114,7 @@ class MemcacheEngine extends CacheEngine {
|
|||
* Delete a key from the cache
|
||||
*
|
||||
* @param string $key Identifier for the data
|
||||
* @return bool 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 succesfully deleted, false if it didn't exist or couldn't be removed
|
||||
* @access public
|
||||
*/
|
||||
function delete($key) {
|
||||
|
@ -123,7 +123,7 @@ class MemcacheEngine extends CacheEngine {
|
|||
/**
|
||||
* Delete all keys from the cache
|
||||
*
|
||||
* @return bool True if the cache was succesfully cleared, false otherwise
|
||||
* @return boolean True if the cache was succesfully cleared, false otherwise
|
||||
* @access public
|
||||
*/
|
||||
function clear() {
|
||||
|
@ -134,7 +134,7 @@ class MemcacheEngine extends CacheEngine {
|
|||
*
|
||||
* @param string $host host ip address or name
|
||||
* @param int $port Server port
|
||||
* @return bool True if memcache server was connected
|
||||
* @return boolean True if memcache server was connected
|
||||
* @access public
|
||||
*/
|
||||
function connect($host, $port = 11211) {
|
||||
|
|
8
cake/libs/cache/model.php
vendored
8
cake/libs/cache/model.php
vendored
|
@ -55,7 +55,7 @@ class ModelEngine extends CacheEngine {
|
|||
* To reinitialize the settings call Cache::engine('EngineName', [optional] settings = array());
|
||||
*
|
||||
* @param array $setting array of setting for the engine
|
||||
* @return bool True if the engine has been successfully initialized, false if not
|
||||
* @return boolean True if the engine has been successfully initialized, false if not
|
||||
* @access public
|
||||
*/
|
||||
function init($settings) {
|
||||
|
@ -82,7 +82,7 @@ class ModelEngine extends CacheEngine {
|
|||
* @param string $key Identifier for the data
|
||||
* @param mixed $data Data to be cached
|
||||
* @param int $duration How long to cache the data, in seconds
|
||||
* @return bool True if the data was succesfully cached, false on failure
|
||||
* @return boolean True if the data was succesfully cached, false on failure
|
||||
* @access public
|
||||
*/
|
||||
function write($key, &$data, $duration) {
|
||||
|
@ -125,7 +125,7 @@ class ModelEngine extends CacheEngine {
|
|||
* Delete a key from the cache
|
||||
*
|
||||
* @param string $key Identifier for the data
|
||||
* @return bool 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 succesfully deleted, false if it didn't exist or couldn't be removed
|
||||
* @access public
|
||||
*/
|
||||
function delete($key) {
|
||||
|
@ -134,7 +134,7 @@ class ModelEngine extends CacheEngine {
|
|||
/**
|
||||
* Delete all keys from the cache
|
||||
*
|
||||
* @return bool True if the cache was succesfully cleared, false otherwise
|
||||
* @return boolean True if the cache was succesfully cleared, false otherwise
|
||||
* @access public
|
||||
*/
|
||||
function clear() {
|
||||
|
|
8
cake/libs/cache/xcache.php
vendored
8
cake/libs/cache/xcache.php
vendored
|
@ -49,7 +49,7 @@ class XcacheEngine extends CacheEngine {
|
|||
* To reinitialize the settings call Cache::engine('EngineName', [optional] settings = array());
|
||||
*
|
||||
* @param array $setting array of setting for the engine
|
||||
* @return bool True if the engine has been successfully initialized, false if not
|
||||
* @return boolean True if the engine has been successfully initialized, false if not
|
||||
* @access public
|
||||
*/
|
||||
function init($settings) {
|
||||
|
@ -64,7 +64,7 @@ class XcacheEngine extends CacheEngine {
|
|||
* @param string $key Identifier for the data
|
||||
* @param mixed $value Data to be cached
|
||||
* @param int $duration How long to cache the data, in seconds
|
||||
* @return bool True if the data was succesfully cached, false on failure
|
||||
* @return boolean True if the data was succesfully cached, false on failure
|
||||
* @access public
|
||||
*/
|
||||
function write($key, &$value, $duration) {
|
||||
|
@ -87,7 +87,7 @@ class XcacheEngine extends CacheEngine {
|
|||
* Delete a key from the cache
|
||||
*
|
||||
* @param string $key Identifier for the data
|
||||
* @return bool 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 succesfully deleted, false if it didn't exist or couldn't be removed
|
||||
* @access public
|
||||
*/
|
||||
function delete($key) {
|
||||
|
@ -96,7 +96,7 @@ class XcacheEngine extends CacheEngine {
|
|||
/**
|
||||
* Delete all keys from the cache
|
||||
*
|
||||
* @return bool True if the cache was succesfully cleared, false otherwise
|
||||
* @return boolean True if the cache was succesfully cleared, false otherwise
|
||||
* @access public
|
||||
*/
|
||||
function clear() {
|
||||
|
|
|
@ -65,7 +65,7 @@ class CakeLog {
|
|||
*
|
||||
* @param string $type Type of log, becomes part of the log's filename
|
||||
* @param string $msg Message to log
|
||||
* @return bool Success
|
||||
* @return boolean Success
|
||||
* @access public
|
||||
*/
|
||||
function write($type, $msg) {
|
||||
|
|
|
@ -69,7 +69,7 @@ class ClassRegistry {
|
|||
*
|
||||
* @param string $key Key for the object in registry
|
||||
* @param mixed $object Object to store
|
||||
* @return bool True if the object was written, false if $key already exists
|
||||
* @return boolean True if the object was written, false if $key already exists
|
||||
* @access public
|
||||
*/
|
||||
function addObject($key, &$object) {
|
||||
|
@ -98,7 +98,7 @@ class ClassRegistry {
|
|||
* Returns true if given key is present in the ClassRegistry.
|
||||
*
|
||||
* @param string $key Key to look for
|
||||
* @return bool true if key exists in registry, false otherwise
|
||||
* @return boolean true if key exists in registry, false otherwise
|
||||
* @access public
|
||||
*/
|
||||
function isKeySet($key) {
|
||||
|
|
|
@ -84,7 +84,7 @@ class AclComponent extends Object {
|
|||
* @param string $aro ARO
|
||||
* @param string $aco ACO
|
||||
* @param string $action Action (defaults to *)
|
||||
* @return bool Success
|
||||
* @return boolean Success
|
||||
* @access public
|
||||
*/
|
||||
function check($aro, $aco, $action = "*") {
|
||||
|
@ -96,7 +96,7 @@ class AclComponent extends Object {
|
|||
* @param string $aro ARO
|
||||
* @param string $aco ACO
|
||||
* @param string $action Action (defaults to *)
|
||||
* @return bool Success
|
||||
* @return boolean Success
|
||||
* @access public
|
||||
*/
|
||||
function allow($aro, $aco, $action = "*") {
|
||||
|
@ -108,7 +108,7 @@ class AclComponent extends Object {
|
|||
* @param string $aro ARO
|
||||
* @param string $aco ACO
|
||||
* @param string $action Action (defaults to *)
|
||||
* @return bool Success
|
||||
* @return boolean Success
|
||||
* @access public
|
||||
*/
|
||||
function deny($aro, $aco, $action = "*") {
|
||||
|
@ -120,7 +120,7 @@ class AclComponent extends Object {
|
|||
* @param string $aro ARO
|
||||
* @param string $aco ACO
|
||||
* @param string $action Action (defaults to *)
|
||||
* @return bool Success
|
||||
* @return boolean Success
|
||||
* @access public
|
||||
*/
|
||||
function inherit($aro, $aco, $action = "*") {
|
||||
|
@ -132,7 +132,7 @@ class AclComponent extends Object {
|
|||
* @param string $aro ARO
|
||||
* @param string $aco ACO
|
||||
* @param string $action Action (defaults to *)
|
||||
* @return bool Success
|
||||
* @return boolean Success
|
||||
* @access public
|
||||
*/
|
||||
function grant($aro, $aco, $action = "*") {
|
||||
|
@ -144,7 +144,7 @@ class AclComponent extends Object {
|
|||
* @param string $aro ARO
|
||||
* @param string $aco ACO
|
||||
* @param string $action Action (defaults to *)
|
||||
* @return bool Success
|
||||
* @return boolean Success
|
||||
* @access public
|
||||
*/
|
||||
function revoke($aro, $aco, $action = "*") {
|
||||
|
@ -154,7 +154,7 @@ class AclComponent extends Object {
|
|||
* Sets the current ARO instance to object from getAro
|
||||
*
|
||||
* @param string $id ID of ARO
|
||||
* @return bool Success
|
||||
* @return boolean Success
|
||||
* @access public
|
||||
*/
|
||||
function setAro($id) {
|
||||
|
@ -164,7 +164,7 @@ class AclComponent extends Object {
|
|||
* Sets the current ACO instance to object from getAco
|
||||
*
|
||||
* @param string $id ID of ACO
|
||||
* @return bool Success
|
||||
* @return boolean Success
|
||||
* @access public
|
||||
*/
|
||||
function setAco($id) {
|
||||
|
@ -514,7 +514,7 @@ class INI_ACL extends AclBase {
|
|||
* @param string $aro ARO
|
||||
* @param string $aco ACO
|
||||
* @param string $aco_action Action
|
||||
* @return bool Success
|
||||
* @return boolean Success
|
||||
* @access public
|
||||
*/
|
||||
function check($aro, $aco, $aco_action = null) {
|
||||
|
|
|
@ -392,7 +392,7 @@ class AuthComponent extends Object {
|
|||
* @param string $type Type of authorization
|
||||
* @param mixed $object object, model object, or model name
|
||||
* @param mixed $user The user to check the authorization of
|
||||
* @return bool True if $user is authorized, otherwise false
|
||||
* @return boolean True if $user is authorized, otherwise false
|
||||
* @access public
|
||||
*/
|
||||
function isAuthorized($type = null, $object = null, $user = null) {
|
||||
|
@ -541,7 +541,7 @@ class AuthComponent extends Object {
|
|||
* AuthComponent::$sessionKey.
|
||||
*
|
||||
* @param mixed $data User object
|
||||
* @return bool True on login success, false on failure
|
||||
* @return boolean True on login success, false on failure
|
||||
* @access public
|
||||
*/
|
||||
function login($data = null) {
|
||||
|
@ -629,7 +629,7 @@ class AuthComponent extends Object {
|
|||
* AuthComponent::identify().
|
||||
* @param string $action Optional. The action to validate against.
|
||||
* @see AuthComponent::identify()
|
||||
* @return bool True if the user validates, false otherwise.
|
||||
* @return boolean True if the user validates, false otherwise.
|
||||
* @access public
|
||||
*/
|
||||
function validate($object, $user = null, $action = null) {
|
||||
|
@ -648,7 +648,7 @@ class AuthComponent extends Object {
|
|||
* @param string $action Optional. The controller/action path to validate the
|
||||
* user against. The current request action is used if
|
||||
* none is specified.
|
||||
* @return bool ACO node path
|
||||
* @return boolean ACO node path
|
||||
* @access public
|
||||
*/
|
||||
function action($action = ':controller/:action') {
|
||||
|
|
|
@ -223,7 +223,7 @@ class RequestHandlerComponent extends Object {
|
|||
/**
|
||||
* Returns true if the current HTTP request is Ajax, false otherwise
|
||||
*
|
||||
* @return bool True if call is Ajax
|
||||
* @return boolean True if call is Ajax
|
||||
*/
|
||||
function isAjax() {
|
||||
return env('HTTP_X_REQUESTED_WITH') === "XMLHttpRequest";
|
||||
|
@ -239,7 +239,7 @@ class RequestHandlerComponent extends Object {
|
|||
/**
|
||||
* Returns true if the current call accepts an XML response, false otherwise
|
||||
*
|
||||
* @return bool True if client accepts an XML response
|
||||
* @return boolean True if client accepts an XML response
|
||||
*/
|
||||
function isXml() {
|
||||
return $this->prefers('xml');
|
||||
|
@ -247,7 +247,7 @@ class RequestHandlerComponent extends Object {
|
|||
/**
|
||||
* Returns true if the current call accepts an RSS response, false otherwise
|
||||
*
|
||||
* @return bool True if client accepts an RSS response
|
||||
* @return boolean True if client accepts an RSS response
|
||||
*/
|
||||
function isRss() {
|
||||
return $this->prefers('rss');
|
||||
|
@ -255,7 +255,7 @@ class RequestHandlerComponent extends Object {
|
|||
/**
|
||||
* Returns true if the current call accepts an Atom response, false otherwise
|
||||
*
|
||||
* @return bool True if client accepts an RSS response
|
||||
* @return boolean True if client accepts an RSS response
|
||||
*/
|
||||
function isAtom() {
|
||||
return $this->prefers('atom');
|
||||
|
@ -264,7 +264,7 @@ class RequestHandlerComponent extends Object {
|
|||
* Returns true if user agent string matches a mobile web browser, or if the
|
||||
* client accepts WAP content.
|
||||
*
|
||||
* @return bool True if user agent is a mobile web browser
|
||||
* @return boolean True if user agent is a mobile web browser
|
||||
*/
|
||||
function isMobile() {
|
||||
preg_match('/' . REQUEST_MOBILE_UA . '/i', env('HTTP_USER_AGENT'), $match);
|
||||
|
@ -284,7 +284,7 @@ class RequestHandlerComponent extends Object {
|
|||
/**
|
||||
* Returns true if the current call a POST request
|
||||
*
|
||||
* @return bool True if call is a POST
|
||||
* @return boolean True if call is a POST
|
||||
*/
|
||||
function isPost() {
|
||||
return (strtolower(env('REQUEST_METHOD')) == 'post');
|
||||
|
@ -292,7 +292,7 @@ class RequestHandlerComponent extends Object {
|
|||
/**
|
||||
* Returns true if the current call a PUT request
|
||||
*
|
||||
* @return bool True if call is a PUT
|
||||
* @return boolean True if call is a PUT
|
||||
*/
|
||||
function isPut() {
|
||||
return (strtolower(env('REQUEST_METHOD')) == 'put');
|
||||
|
@ -300,7 +300,7 @@ class RequestHandlerComponent extends Object {
|
|||
/**
|
||||
* Returns true if the current call a GET request
|
||||
*
|
||||
* @return bool True if call is a GET
|
||||
* @return boolean True if call is a GET
|
||||
*/
|
||||
function isGet() {
|
||||
return (strtolower(env('REQUEST_METHOD')) == 'get');
|
||||
|
@ -308,7 +308,7 @@ class RequestHandlerComponent extends Object {
|
|||
/**
|
||||
* Returns true if the current call a DELETE request
|
||||
*
|
||||
* @return bool True if call is a DELETE
|
||||
* @return boolean True if call is a DELETE
|
||||
*/
|
||||
function isDelete() {
|
||||
return (strtolower(env('REQUEST_METHOD')) == 'delete');
|
||||
|
@ -547,7 +547,7 @@ class RequestHandlerComponent extends Object {
|
|||
* @param array $options If $type is a friendly type name that is associated with
|
||||
* more than one type of content, $index is used to select
|
||||
* which content-type to use.
|
||||
* @return bool Returns false if the friendly type name given in $type does
|
||||
* @return boolean Returns false if the friendly type name given in $type does
|
||||
* not exist in the type map, or if the Content-type header has
|
||||
* already been set by this method.
|
||||
* @access public
|
||||
|
|
|
@ -134,7 +134,7 @@ class SessionComponent extends CakeSession {
|
|||
* In your controller: $this->Session->del('Controller.sessKey');
|
||||
*
|
||||
* @param string $name
|
||||
* @return bool true is session variable is set and can be deleted, false is variable was not set.
|
||||
* @return boolean true is session variable is set and can be deleted, false is variable was not set.
|
||||
*/
|
||||
function del($name) {
|
||||
if ($this->__active === true) {
|
||||
|
@ -163,7 +163,7 @@ class SessionComponent extends CakeSession {
|
|||
* In your controller: $this->Session->check('Controller.sessKey');
|
||||
*
|
||||
* @param string $name
|
||||
* @return bool true is session variable is set, false if not
|
||||
* @return boolean true is session variable is set, false if not
|
||||
* @access public
|
||||
*/
|
||||
function check($name) {
|
||||
|
@ -220,7 +220,7 @@ class SessionComponent extends CakeSession {
|
|||
*
|
||||
* In your controller: $this->Session->valid();
|
||||
*
|
||||
* @return bool true is session is valid, false is session is invalid
|
||||
* @return boolean true is session is valid, false is session is invalid
|
||||
* @access public
|
||||
*/
|
||||
function valid() {
|
||||
|
|
|
@ -607,7 +607,7 @@ class Controller extends Object {
|
|||
* @param string $action Action name to render
|
||||
* @param string $layout Layout to use
|
||||
* @param string $file File to use for rendering
|
||||
* @return bool Success
|
||||
* @return boolean Success
|
||||
* @access public
|
||||
*/
|
||||
function render($action = null, $layout = null, $file = null) {
|
||||
|
@ -1210,7 +1210,7 @@ class Controller extends Object {
|
|||
* This method should be overridden in child classes.
|
||||
*
|
||||
* @param string $method name of method called example index, edit, etc.
|
||||
* @return bool Success
|
||||
* @return boolean Success
|
||||
* @access protected
|
||||
*/
|
||||
function _beforeScaffold($method) {
|
||||
|
@ -1220,7 +1220,7 @@ class Controller extends Object {
|
|||
* This method should be overridden in child classes.
|
||||
*
|
||||
* @param string $method name of method called either edit or update.
|
||||
* @return bool Success
|
||||
* @return boolean Success
|
||||
* @access protected
|
||||
*/
|
||||
function _afterScaffoldSave($method) {
|
||||
|
@ -1230,7 +1230,7 @@ class Controller extends Object {
|
|||
* This method should be overridden in child classes.
|
||||
*
|
||||
* @param string $method name of method called either edit or update.
|
||||
* @return bool Success
|
||||
* @return boolean Success
|
||||
* @access protected
|
||||
*/
|
||||
function _afterScaffoldSaveError($method) {
|
||||
|
@ -1242,7 +1242,7 @@ class Controller extends Object {
|
|||
* Method MUST return true in child classes
|
||||
*
|
||||
* @param string $method name of method called example index, edit, etc.
|
||||
* @return bool Success
|
||||
* @return boolean Success
|
||||
* @access protected
|
||||
*/
|
||||
function _scaffoldError($method) {
|
||||
|
|
|
@ -97,7 +97,7 @@ class Debugger extends Object {
|
|||
* @param string $file File on which error occurred
|
||||
* @param int $line Line that triggered the error
|
||||
* @param array $context Context
|
||||
* @return bool true if error was handled
|
||||
* @return boolean true if error was handled
|
||||
* @access public
|
||||
*/
|
||||
function handleError($code, $description, $file = null, $line = null, $context = null) {
|
||||
|
|
|
@ -112,7 +112,7 @@ class File extends Object {
|
|||
/**
|
||||
* Creates the File.
|
||||
*
|
||||
* @return bool Success
|
||||
* @return boolean Success
|
||||
* @access public
|
||||
*/
|
||||
function create() {
|
||||
|
@ -129,7 +129,7 @@ class File extends Object {
|
|||
*
|
||||
* @param string $mode A valid 'fopen' mode string (r|w|a ...)
|
||||
* @param bool $force If true then the file will be re-opened even if its already opened, otherwise it won't
|
||||
* @return bool True on success, false on failure
|
||||
* @return boolean True on success, false on failure
|
||||
* @access public
|
||||
*/
|
||||
function open($mode = 'r', $force = false) {
|
||||
|
@ -205,7 +205,7 @@ class File extends Object {
|
|||
* @param string $data Data to write to this File.
|
||||
* @param string $mode Mode of writing. {@link http://php.net/fwrite See fwrite()}.
|
||||
* @param string $force force the file to open
|
||||
* @return bool Success
|
||||
* @return boolean Success
|
||||
* @access public
|
||||
*/
|
||||
function write($data, $mode = 'w', $force = false) {
|
||||
|
@ -236,7 +236,7 @@ class File extends Object {
|
|||
*
|
||||
* @param string $data Data to write
|
||||
* @param string $force force the file to open
|
||||
* @return bool Success
|
||||
* @return boolean Success
|
||||
* @access public
|
||||
*/
|
||||
function append($data, $force = false) {
|
||||
|
@ -245,7 +245,7 @@ class File extends Object {
|
|||
/**
|
||||
* Closes the current file if it is opened.
|
||||
*
|
||||
* @return bool True if closing was successful or file was already closed, otherwise false
|
||||
* @return boolean True if closing was successful or file was already closed, otherwise false
|
||||
* @access public
|
||||
*/
|
||||
function close() {
|
||||
|
@ -257,7 +257,7 @@ class File extends Object {
|
|||
/**
|
||||
* Deletes the File.
|
||||
*
|
||||
* @return bool Success
|
||||
* @return boolean Success
|
||||
* @access public
|
||||
*/
|
||||
function delete() {
|
||||
|
@ -359,7 +359,7 @@ class File extends Object {
|
|||
/**
|
||||
* Returns true if the File exists.
|
||||
*
|
||||
* @return bool true if it exists, false otherwise
|
||||
* @return boolean true if it exists, false otherwise
|
||||
* @access public
|
||||
*/
|
||||
function exists() {
|
||||
|
@ -394,7 +394,7 @@ class File extends Object {
|
|||
/**
|
||||
* Returns true if the File is writable.
|
||||
*
|
||||
* @return bool true if its writable, false otherwise
|
||||
* @return boolean true if its writable, false otherwise
|
||||
* @access public
|
||||
*/
|
||||
function writable() {
|
||||
|
@ -403,7 +403,7 @@ class File extends Object {
|
|||
/**
|
||||
* Returns true if the File is executable.
|
||||
*
|
||||
* @return bool true if its executable, false otherwise
|
||||
* @return boolean true if its executable, false otherwise
|
||||
* @access public
|
||||
*/
|
||||
function executable() {
|
||||
|
@ -412,7 +412,7 @@ class File extends Object {
|
|||
/**
|
||||
* Returns true if the File is readable.
|
||||
*
|
||||
* @return bool true if file is readable, false otherwise
|
||||
* @return boolean true if file is readable, false otherwise
|
||||
* @access public
|
||||
*/
|
||||
function readable() {
|
||||
|
|
|
@ -239,7 +239,7 @@ class Folder extends Object{
|
|||
* Returns true if given $path is a Windows path.
|
||||
*
|
||||
* @param string $path Path to check
|
||||
* @return bool true if windows path, false otherwise
|
||||
* @return boolean true if windows path, false otherwise
|
||||
* @access public
|
||||
* @static
|
||||
*/
|
||||
|
@ -265,7 +265,7 @@ class Folder extends Object{
|
|||
* Returns true if given $path ends in a slash (i.e. is slash-terminated).
|
||||
*
|
||||
* @param string $path Path to check
|
||||
* @return bool true if path ends with slash, false otherwise
|
||||
* @return boolean true if path ends with slash, false otherwise
|
||||
* @access public
|
||||
* @static
|
||||
*/
|
||||
|
@ -367,7 +367,7 @@ class Folder extends Object{
|
|||
* @param int $mode octal value 0755
|
||||
* @param bool $recursive chmod recursively
|
||||
* @param array $exceptions array of files, directories to skip
|
||||
* @return bool Returns TRUE on success, FALSE on failure
|
||||
* @return boolean Returns TRUE on success, FALSE on failure
|
||||
* @access public
|
||||
*/
|
||||
function chmod($path, $mode = false, $recursive = true, $exceptions = array()) {
|
||||
|
@ -465,7 +465,7 @@ class Folder extends Object{
|
|||
*
|
||||
* @param string $pathname The directory structure to create
|
||||
* @param int $mode octal value 0755
|
||||
* @return bool Returns TRUE on success, FALSE on failure
|
||||
* @return boolean Returns TRUE on success, FALSE on failure
|
||||
* @access public
|
||||
*/
|
||||
function create($pathname, $mode = false) {
|
||||
|
@ -535,7 +535,7 @@ class Folder extends Object{
|
|||
* Recursively Remove directories if system allow.
|
||||
*
|
||||
* @param string $path Path of directory to delete
|
||||
* @return bool Success
|
||||
* @return boolean Success
|
||||
* @access public
|
||||
*/
|
||||
function delete($path) {
|
||||
|
@ -649,7 +649,7 @@ class Folder extends Object{
|
|||
* Recursive directory move.
|
||||
*
|
||||
* @param array $options (to, from, chmod, skip)
|
||||
* @return bool Success
|
||||
* @return boolean Success
|
||||
* @access public
|
||||
*/
|
||||
function move($options) {
|
||||
|
|
|
@ -809,7 +809,7 @@ class HttpSocket extends CakeSocket {
|
|||
* the same thing partially for the request and the response property only.
|
||||
*
|
||||
* @param bool $full If set to false only HttpSocket::response and HttpSocket::request are reseted
|
||||
* @return bool True on success
|
||||
* @return boolean True on success
|
||||
* @access public
|
||||
*/
|
||||
function reset($full = true) {
|
||||
|
|
|
@ -382,7 +382,7 @@ class L10n extends Object {
|
|||
/**
|
||||
* Attempts to find the locale settings based on the HTTP_ACCEPT_LANGUAGE variable
|
||||
*
|
||||
* @return bool Success
|
||||
* @return boolean Success
|
||||
* @access private
|
||||
*/
|
||||
function __autoLanguage() {
|
||||
|
|
|
@ -51,7 +51,7 @@ class MagicDb extends Object {
|
|||
* Reads a MagicDb from various formats
|
||||
*
|
||||
* @var $magicDb mixed Can be an array containing the db, a magic db as a string, or a filename pointing to a magic db in .db or magic.db.php format
|
||||
* @return bool Returns false if reading / validation failed or true on success.
|
||||
* @return boolean Returns false if reading / validation failed or true on success.
|
||||
* @author Felix
|
||||
**/
|
||||
function read($magicDb = null) {
|
||||
|
@ -137,7 +137,7 @@ class MagicDb extends Object {
|
|||
* Returns true if the MagicDb instance or the passed $magicDb is valid
|
||||
*
|
||||
* @param mixed $magicDb A $magicDb string / array to validate (optional)
|
||||
* @return bool True if the $magicDb / instance db validates, false if not
|
||||
* @return boolean True if the $magicDb / instance db validates, false if not
|
||||
* @access public
|
||||
*/
|
||||
function validates($magicDb = null) {
|
||||
|
|
|
@ -62,7 +62,7 @@ class TreeBehavior extends ModelBehavior {
|
|||
*
|
||||
* @param AppModel $model
|
||||
* @param bool $created indicates whether the node just saved was created or updated
|
||||
* @return bool true on success, false on failure
|
||||
* @return boolean true on success, false on failure
|
||||
*/
|
||||
function afterSave(&$model, $created) {
|
||||
extract($this->settings[$model->name]);
|
||||
|
@ -84,7 +84,7 @@ class TreeBehavior extends ModelBehavior {
|
|||
* Will delete the current node and all children using the deleteAll method and sync the table
|
||||
*
|
||||
* @param AppModel $model
|
||||
* @return bool true to continue, false to abort the delete
|
||||
* @return boolean true to continue, false to abort the delete
|
||||
*/
|
||||
function beforeDelete(&$model) {
|
||||
extract($this->settings[$model->name]);
|
||||
|
@ -118,7 +118,7 @@ class TreeBehavior extends ModelBehavior {
|
|||
*
|
||||
* @since 1.2
|
||||
* @param AppModel $model
|
||||
* @return bool true to continue, false to abort the save
|
||||
* @return boolean true to continue, false to abort the save
|
||||
*/
|
||||
function beforeSave(&$model) {
|
||||
extract($this->settings[$model->name]);
|
||||
|
@ -359,7 +359,7 @@ class TreeBehavior extends ModelBehavior {
|
|||
* @param AppModel $model
|
||||
* @param mixed $id The ID of the record to move
|
||||
* @param mixed $number how many places to move the node or true to move to last position
|
||||
* @return bool true on success, false on failure
|
||||
* @return boolean true on success, false on failure
|
||||
* @access public
|
||||
*/
|
||||
function movedown(&$model, $id = null, $number = 1) {
|
||||
|
@ -403,7 +403,7 @@ class TreeBehavior extends ModelBehavior {
|
|||
* @param AppModel $model
|
||||
* @param mixed $id The ID of the record to move
|
||||
* @param mixed $number how many places to move the node, or true to move to first position
|
||||
* @return bool true on success, false on failure
|
||||
* @return boolean true on success, false on failure
|
||||
* @access public
|
||||
*/
|
||||
function moveup(&$model, $id = null, $number = 1) {
|
||||
|
@ -449,7 +449,7 @@ class TreeBehavior extends ModelBehavior {
|
|||
* @todo Could be written to be faster, *maybe*. Ideally using a subquery and putting all the logic burden on the DB.
|
||||
* @param AppModel $model
|
||||
* @param string $mode parent or tree
|
||||
* @return bool true on success, false on failure
|
||||
* @return boolean true on success, false on failure
|
||||
* @access public
|
||||
*/
|
||||
function recover(&$model, $mode = 'parent') {
|
||||
|
@ -489,7 +489,7 @@ class TreeBehavior extends ModelBehavior {
|
|||
* @param AppModel $model
|
||||
* @param mixed $id The ID of the record to remove
|
||||
* @param bool $delete whether to delete the node after reparenting children (if any)
|
||||
* @return bool true on success, false on failure
|
||||
* @return boolean true on success, false on failure
|
||||
* @access public
|
||||
*/
|
||||
function removefromtree(&$model, $id = null, $delete = false) {
|
||||
|
@ -622,7 +622,7 @@ class TreeBehavior extends ModelBehavior {
|
|||
*
|
||||
* @param AppModel $model
|
||||
* @param mixed $parentId
|
||||
* @return bool true on success, false on failure
|
||||
* @return boolean true on success, false on failure
|
||||
* @access protected
|
||||
*/
|
||||
function _setParent(&$model, $parentId = null) {
|
||||
|
|
|
@ -144,7 +144,7 @@ class ConnectionManager extends Object {
|
|||
*
|
||||
* @param mixed $connName A string name of the connection, as defined in Connections config,
|
||||
* or an array containing the file and class name of the object.
|
||||
* @return bool True on success, null on failure or false if the class is already loaded
|
||||
* @return boolean True on success, null on failure or false if the class is already loaded
|
||||
*/
|
||||
function loadDataSource($connName) {
|
||||
$_this =& ConnectionManager::getInstance();
|
||||
|
|
|
@ -336,7 +336,7 @@ class DataSource extends Object {
|
|||
* Returns true if the DataSource supports the given interface (method)
|
||||
*
|
||||
* @param string $interface The name of the interface (method)
|
||||
* @return bool True on success
|
||||
* @return boolean True on success
|
||||
*/
|
||||
function isInterfaceSupported($interface) {
|
||||
$methods = get_class_methods(get_class($this));
|
||||
|
|
|
@ -103,7 +103,7 @@ class DboAdodb extends DboSource {
|
|||
/**
|
||||
* Disconnects from database.
|
||||
*
|
||||
* @return bool True if the database could be disconnected, else false
|
||||
* @return boolean True if the database could be disconnected, else false
|
||||
*/
|
||||
function disconnect() {
|
||||
return $this->_adodb->Close();
|
||||
|
@ -149,7 +149,7 @@ class DboAdodb extends DboSource {
|
|||
* Begin a transaction
|
||||
*
|
||||
* @param unknown_type $model
|
||||
* @return bool True on success, false on fail
|
||||
* @return boolean True on success, false on fail
|
||||
* (i.e. if the database/model does not support transactions).
|
||||
*/
|
||||
function begin(&$model) {
|
||||
|
@ -165,7 +165,7 @@ class DboAdodb extends DboSource {
|
|||
* Commit a transaction
|
||||
*
|
||||
* @param unknown_type $model
|
||||
* @return bool True on success, false on fail
|
||||
* @return boolean True on success, false on fail
|
||||
* (i.e. if the database/model does not support transactions,
|
||||
* or a transaction has not started).
|
||||
*/
|
||||
|
@ -180,7 +180,7 @@ class DboAdodb extends DboSource {
|
|||
* Rollback a transaction
|
||||
*
|
||||
* @param unknown_type $model
|
||||
* @return bool True on success, false on fail
|
||||
* @return boolean True on success, false on fail
|
||||
* (i.e. if the database/model does not support transactions,
|
||||
* or a transaction has not started).
|
||||
*/
|
||||
|
|
|
@ -104,7 +104,7 @@ class DboDb2 extends DboSource {
|
|||
/**
|
||||
* Connects to the database using options in the given configuration array.
|
||||
*
|
||||
* @return bool True if the database could be connected, else false
|
||||
* @return boolean True if the database could be connected, else false
|
||||
*/
|
||||
function connect() {
|
||||
$config = $this->config;
|
||||
|
@ -138,7 +138,7 @@ class DboDb2 extends DboSource {
|
|||
/**
|
||||
* Disconnects from database.
|
||||
*
|
||||
* @return bool True if the database could be disconnected, else false
|
||||
* @return boolean True if the database could be disconnected, else false
|
||||
*/
|
||||
function disconnect() {
|
||||
@db2_free_result($this->results);
|
||||
|
@ -306,7 +306,7 @@ class DboDb2 extends DboSource {
|
|||
* started successfully, otherwise false.
|
||||
*
|
||||
* @param unknown_type $model
|
||||
* @return bool True on success, false on fail
|
||||
* @return boolean True on success, false on fail
|
||||
* (i.e. if the database/model does not support transactions).
|
||||
*/
|
||||
function begin(&$model) {
|
||||
|
@ -322,7 +322,7 @@ class DboDb2 extends DboSource {
|
|||
* Commit a transaction
|
||||
*
|
||||
* @param unknown_type $model
|
||||
* @return bool True on success, false on fail
|
||||
* @return boolean True on success, false on fail
|
||||
* (i.e. if the database/model does not support transactions,
|
||||
* or a transaction has not started).
|
||||
*/
|
||||
|
@ -340,7 +340,7 @@ class DboDb2 extends DboSource {
|
|||
* Rollback a transaction
|
||||
*
|
||||
* @param unknown_type $model
|
||||
* @return bool True on success, false on fail
|
||||
* @return boolean True on success, false on fail
|
||||
* (i.e. if the database/model does not support transactions,
|
||||
* or a transaction has not started).
|
||||
*/
|
||||
|
|
|
@ -112,7 +112,7 @@ class DboFirebird extends DboSource {
|
|||
/**
|
||||
* Connects to the database using options in the given configuration array.
|
||||
*
|
||||
* @return bool True if the database could be connected, else false
|
||||
* @return boolean True if the database could be connected, else false
|
||||
*/
|
||||
function connect() {
|
||||
$config = $this->config;
|
||||
|
@ -125,7 +125,7 @@ class DboFirebird extends DboSource {
|
|||
/**
|
||||
* Disconnects from database.
|
||||
*
|
||||
* @return bool True if the database could be disconnected, else false
|
||||
* @return boolean True if the database could be disconnected, else false
|
||||
*/
|
||||
function disconnect() {
|
||||
$this->connected = false;
|
||||
|
|
|
@ -97,7 +97,7 @@ class DboMssql extends DboSource {
|
|||
* MS SQL DBO driver constructor; sets SQL Server error reporting defaults
|
||||
*
|
||||
* @param array $config Configuration data from app/config/databases.php
|
||||
* @return bool True if connected successfully, false on error
|
||||
* @return boolean True if connected successfully, false on error
|
||||
*/
|
||||
function __construct($config, $autoConnect = true) {
|
||||
if ($autoConnect) {
|
||||
|
@ -112,7 +112,7 @@ class DboMssql extends DboSource {
|
|||
/**
|
||||
* Connects to the database using options in the given configuration array.
|
||||
*
|
||||
* @return bool True if the database could be connected, else false
|
||||
* @return boolean True if the database could be connected, else false
|
||||
*/
|
||||
function connect() {
|
||||
$config = $this->config;
|
||||
|
@ -145,7 +145,7 @@ class DboMssql extends DboSource {
|
|||
/**
|
||||
* Disconnects from database.
|
||||
*
|
||||
* @return bool True if the database could be disconnected, else false
|
||||
* @return boolean True if the database could be disconnected, else false
|
||||
*/
|
||||
function disconnect() {
|
||||
@mssql_free_result($this->results);
|
||||
|
@ -291,7 +291,7 @@ class DboMssql extends DboSource {
|
|||
* Begin a transaction
|
||||
*
|
||||
* @param unknown_type $model
|
||||
* @return bool True on success, false on fail
|
||||
* @return boolean True on success, false on fail
|
||||
* (i.e. if the database/model does not support transactions).
|
||||
*/
|
||||
function begin(&$model) {
|
||||
|
@ -307,7 +307,7 @@ class DboMssql extends DboSource {
|
|||
* Commit a transaction
|
||||
*
|
||||
* @param unknown_type $model
|
||||
* @return bool True on success, false on fail
|
||||
* @return boolean True on success, false on fail
|
||||
* (i.e. if the database/model does not support transactions,
|
||||
* or a transaction has not started).
|
||||
*/
|
||||
|
@ -322,7 +322,7 @@ class DboMssql extends DboSource {
|
|||
* Rollback a transaction
|
||||
*
|
||||
* @param unknown_type $model
|
||||
* @return bool True on success, false on fail
|
||||
* @return boolean True on success, false on fail
|
||||
* (i.e. if the database/model does not support transactions,
|
||||
* or a transaction has not started).
|
||||
*/
|
||||
|
|
|
@ -89,7 +89,7 @@ class DboMysql extends DboSource {
|
|||
/**
|
||||
* Connects to the database using options in the given configuration array.
|
||||
*
|
||||
* @return bool True if the database could be connected, else false
|
||||
* @return boolean True if the database could be connected, else false
|
||||
*/
|
||||
function connect() {
|
||||
$config = $this->config;
|
||||
|
@ -115,7 +115,7 @@ class DboMysql extends DboSource {
|
|||
/**
|
||||
* Disconnects from database.
|
||||
*
|
||||
* @return bool True if the database could be disconnected, else false
|
||||
* @return boolean True if the database could be disconnected, else false
|
||||
*/
|
||||
function disconnect() {
|
||||
@mysql_free_result($this->results);
|
||||
|
@ -237,7 +237,7 @@ class DboMysql extends DboSource {
|
|||
* Begin a transaction
|
||||
*
|
||||
* @param unknown_type $model
|
||||
* @return bool True on success, false on fail
|
||||
* @return boolean True on success, false on fail
|
||||
* (i.e. if the database/model does not support transactions).
|
||||
*/
|
||||
function begin(&$model) {
|
||||
|
@ -253,7 +253,7 @@ class DboMysql extends DboSource {
|
|||
* Commit a transaction
|
||||
*
|
||||
* @param unknown_type $model
|
||||
* @return bool True on success, false on fail
|
||||
* @return boolean True on success, false on fail
|
||||
* (i.e. if the database/model does not support transactions,
|
||||
* or a transaction has not started).
|
||||
*/
|
||||
|
@ -268,7 +268,7 @@ class DboMysql extends DboSource {
|
|||
* Rollback a transaction
|
||||
*
|
||||
* @param unknown_type $model
|
||||
* @return bool True on success, false on fail
|
||||
* @return boolean True on success, false on fail
|
||||
* (i.e. if the database/model does not support transactions,
|
||||
* or a transaction has not started).
|
||||
*/
|
||||
|
|
|
@ -85,7 +85,7 @@ class DboMysqli extends DboSource {
|
|||
/**
|
||||
* Connects to the database using options in the given configuration array.
|
||||
*
|
||||
* @return bool True if the database could be connected, else false
|
||||
* @return boolean True if the database could be connected, else false
|
||||
*/
|
||||
function connect() {
|
||||
$config = $this->config;
|
||||
|
@ -104,7 +104,7 @@ class DboMysqli extends DboSource {
|
|||
/**
|
||||
* Disconnects from database.
|
||||
*
|
||||
* @return bool True if the database could be disconnected, else false
|
||||
* @return boolean True if the database could be disconnected, else false
|
||||
*/
|
||||
function disconnect() {
|
||||
@mysqli_free_result($this->results);
|
||||
|
@ -223,7 +223,7 @@ class DboMysqli extends DboSource {
|
|||
* Begin a transaction
|
||||
*
|
||||
* @param unknown_type $model
|
||||
* @return bool True on success, false on fail
|
||||
* @return boolean True on success, false on fail
|
||||
* (i.e. if the database/model does not support transactions).
|
||||
*/
|
||||
function begin(&$model) {
|
||||
|
@ -239,7 +239,7 @@ class DboMysqli extends DboSource {
|
|||
* Commit a transaction
|
||||
*
|
||||
* @param unknown_type $model
|
||||
* @return bool True on success, false on fail
|
||||
* @return boolean True on success, false on fail
|
||||
* (i.e. if the database/model does not support transactions,
|
||||
* or a transaction has not started).
|
||||
*/
|
||||
|
@ -254,7 +254,7 @@ class DboMysqli extends DboSource {
|
|||
* Rollback a transaction
|
||||
*
|
||||
* @param unknown_type $model
|
||||
* @return bool True on success, false on fail
|
||||
* @return boolean True on success, false on fail
|
||||
* (i.e. if the database/model does not support transactions,
|
||||
* or a transaction has not started).
|
||||
*/
|
||||
|
|
|
@ -94,7 +94,7 @@ class DboOdbc extends DboSource{
|
|||
/**
|
||||
* Connects to the database using options in the given configuration array.
|
||||
*
|
||||
* @return bool True if the database could be connected, else false
|
||||
* @return boolean True if the database could be connected, else false
|
||||
*/
|
||||
function connect() {
|
||||
$config = $this->config;
|
||||
|
@ -113,7 +113,7 @@ class DboOdbc extends DboSource{
|
|||
/**
|
||||
* Disconnects from database.
|
||||
*
|
||||
* @return bool True if the database could be disconnected, else false
|
||||
* @return boolean True if the database could be disconnected, else false
|
||||
*/
|
||||
function disconnect() {
|
||||
return @odbc_close($this->connection);
|
||||
|
@ -261,7 +261,7 @@ class DboOdbc extends DboSource{
|
|||
* Begin a transaction
|
||||
*
|
||||
* @param unknown_type $model
|
||||
* @return bool True on success, false on fail
|
||||
* @return boolean True on success, false on fail
|
||||
* (i.e. if the database/model does not support transactions).
|
||||
*/
|
||||
function begin(&$model) {
|
||||
|
@ -279,7 +279,7 @@ class DboOdbc extends DboSource{
|
|||
* Commit a transaction
|
||||
*
|
||||
* @param unknown_type $model
|
||||
* @return bool True on success, false on fail
|
||||
* @return boolean True on success, false on fail
|
||||
* (i.e. if the database/model does not support transactions,
|
||||
* or a transaction has not started).
|
||||
*/
|
||||
|
@ -298,7 +298,7 @@ class DboOdbc extends DboSource{
|
|||
* Rollback a transaction
|
||||
*
|
||||
* @param unknown_type $model
|
||||
* @return bool True on success, false on fail
|
||||
* @return boolean True on success, false on fail
|
||||
* (i.e. if the database/model does not support transactions,
|
||||
* or a transaction has not started).
|
||||
*/
|
||||
|
|
|
@ -133,7 +133,7 @@ class DboOracle extends DboSource {
|
|||
/**
|
||||
* Connects to the database using options in the given configuration array.
|
||||
*
|
||||
* @return bool True if the database could be connected, else false
|
||||
* @return boolean True if the database could be connected, else false
|
||||
* @access public
|
||||
*/
|
||||
function connect() {
|
||||
|
@ -189,7 +189,7 @@ class DboOracle extends DboSource {
|
|||
/**
|
||||
* Disconnects from database.
|
||||
*
|
||||
* @return bool True if the database could be disconnected, else false
|
||||
* @return boolean True if the database could be disconnected, else false
|
||||
* @access public
|
||||
*/
|
||||
function disconnect() {
|
||||
|
@ -455,7 +455,7 @@ class DboOracle extends DboSource {
|
|||
* Begin a transaction
|
||||
*
|
||||
* @param unknown_type $model
|
||||
* @return bool True on success, false on fail
|
||||
* @return boolean True on success, false on fail
|
||||
* (i.e. if the database/model does not support transactions).
|
||||
*/
|
||||
function begin() {
|
||||
|
@ -466,7 +466,7 @@ class DboOracle extends DboSource {
|
|||
* Rollback a transaction
|
||||
*
|
||||
* @param unknown_type $model
|
||||
* @return bool True on success, false on fail
|
||||
* @return boolean True on success, false on fail
|
||||
* (i.e. if the database/model does not support transactions,
|
||||
* or a transaction has not started).
|
||||
*/
|
||||
|
@ -477,7 +477,7 @@ class DboOracle extends DboSource {
|
|||
* Commit a transaction
|
||||
*
|
||||
* @param unknown_type $model
|
||||
* @return bool True on success, false on fail
|
||||
* @return boolean True on success, false on fail
|
||||
* (i.e. if the database/model does not support transactions,
|
||||
* or a transaction has not started).
|
||||
*/
|
||||
|
|
|
@ -105,7 +105,7 @@ class DboPostgres extends DboSource {
|
|||
/**
|
||||
* Disconnects from database.
|
||||
*
|
||||
* @return bool True if the database could be disconnected, else false
|
||||
* @return boolean True if the database could be disconnected, else false
|
||||
*/
|
||||
function disconnect() {
|
||||
@pg_free_result($this->results);
|
||||
|
@ -256,7 +256,7 @@ class DboPostgres extends DboSource {
|
|||
* Begin a transaction
|
||||
*
|
||||
* @param unknown_type $model
|
||||
* @return bool True on success, false on fail
|
||||
* @return boolean True on success, false on fail
|
||||
* (i.e. if the database/model does not support transactions).
|
||||
*/
|
||||
function begin(&$model) {
|
||||
|
@ -273,7 +273,7 @@ class DboPostgres extends DboSource {
|
|||
* Commit a transaction
|
||||
*
|
||||
* @param unknown_type $model
|
||||
* @return bool True on success, false on fail
|
||||
* @return boolean True on success, false on fail
|
||||
* (i.e. if the database/model does not support transactions,
|
||||
* or a transaction has not started).
|
||||
*/
|
||||
|
@ -289,7 +289,7 @@ class DboPostgres extends DboSource {
|
|||
* Rollback a transaction
|
||||
*
|
||||
* @param unknown_type $model
|
||||
* @return bool True on success, false on fail
|
||||
* @return boolean True on success, false on fail
|
||||
* (i.e. if the database/model does not support transactions,
|
||||
* or a transaction has not started).
|
||||
*/
|
||||
|
@ -565,7 +565,7 @@ class DboPostgres extends DboSource {
|
|||
* Sets the database encoding
|
||||
*
|
||||
* @param mixed $enc Database encoding
|
||||
* @return bool True on success, false on failure
|
||||
* @return boolean True on success, false on failure
|
||||
*/
|
||||
function setEncoding($enc) {
|
||||
return pg_set_client_encoding($this->connection, $enc) == 0;
|
||||
|
|
|
@ -98,7 +98,7 @@ class DboSqlite extends DboSource {
|
|||
/**
|
||||
* Disconnects from database.
|
||||
*
|
||||
* @return bool True if the database could be disconnected, else false
|
||||
* @return boolean True if the database could be disconnected, else false
|
||||
*/
|
||||
function disconnect() {
|
||||
@sqlite_close($this->connection);
|
||||
|
@ -205,7 +205,7 @@ class DboSqlite extends DboSource {
|
|||
* Begin a transaction
|
||||
*
|
||||
* @param unknown_type $model
|
||||
* @return bool True on success, false on fail
|
||||
* @return boolean True on success, false on fail
|
||||
* (i.e. if the database/model does not support transactions).
|
||||
*/
|
||||
function begin (&$model) {
|
||||
|
@ -221,7 +221,7 @@ class DboSqlite extends DboSource {
|
|||
* Commit a transaction
|
||||
*
|
||||
* @param unknown_type $model
|
||||
* @return bool True on success, false on fail
|
||||
* @return boolean True on success, false on fail
|
||||
* (i.e. if the database/model does not support transactions,
|
||||
* or a transaction has not started).
|
||||
*/
|
||||
|
@ -236,7 +236,7 @@ class DboSqlite extends DboSource {
|
|||
* Rollback a transaction
|
||||
*
|
||||
* @param unknown_type $model
|
||||
* @return bool True on success, false on fail
|
||||
* @return boolean True on success, false on fail
|
||||
* (i.e. if the database/model does not support transactions,
|
||||
* or a transaction has not started).
|
||||
*/
|
||||
|
|
|
@ -87,7 +87,7 @@ class DboSybase extends DboSource {
|
|||
/**
|
||||
* Connects to the database using options in the given configuration array.
|
||||
*
|
||||
* @return bool True if the database could be connected, else false
|
||||
* @return boolean True if the database could be connected, else false
|
||||
*/
|
||||
function connect() {
|
||||
$config = $this->config;
|
||||
|
@ -107,7 +107,7 @@ class DboSybase extends DboSource {
|
|||
/**
|
||||
* Disconnects from database.
|
||||
*
|
||||
* @return bool True if the database could be disconnected, else false
|
||||
* @return boolean True if the database could be disconnected, else false
|
||||
*/
|
||||
function disconnect() {
|
||||
$this->connected = !@sybase_close($this->connection);
|
||||
|
@ -217,7 +217,7 @@ class DboSybase extends DboSource {
|
|||
* Begin a transaction
|
||||
*
|
||||
* @param unknown_type $model
|
||||
* @return bool True on success, false on fail
|
||||
* @return boolean True on success, false on fail
|
||||
* (i.e. if the database/model does not support transactions).
|
||||
*/
|
||||
function begin(&$model) {
|
||||
|
@ -233,7 +233,7 @@ class DboSybase extends DboSource {
|
|||
* Commit a transaction
|
||||
*
|
||||
* @param unknown_type $model
|
||||
* @return bool True on success, false on fail
|
||||
* @return boolean True on success, false on fail
|
||||
* (i.e. if the database/model does not support transactions,
|
||||
* or a transaction has not started).
|
||||
*/
|
||||
|
@ -248,7 +248,7 @@ class DboSybase extends DboSource {
|
|||
* Rollback a transaction
|
||||
*
|
||||
* @param unknown_type $model
|
||||
* @return bool True on success, false on fail
|
||||
* @return boolean True on success, false on fail
|
||||
* (i.e. if the database/model does not support transactions,
|
||||
* or a transaction has not started).
|
||||
*/
|
||||
|
|
|
@ -102,7 +102,7 @@ class DboSource extends DataSource {
|
|||
* Reconnects to database server with optional new settings
|
||||
*
|
||||
* @param array $config An array defining the new configuration settings
|
||||
* @return bool True on success, false on failure
|
||||
* @return boolean True on success, false on failure
|
||||
*/
|
||||
function reconnect($config = null) {
|
||||
$this->disconnect();
|
||||
|
@ -363,7 +363,7 @@ class DboSource extends DataSource {
|
|||
/**
|
||||
* Checks if it's connected to the database
|
||||
*
|
||||
* @return bool True if the database is connected, else false
|
||||
* @return boolean True if the database is connected, else false
|
||||
*/
|
||||
function isConnected() {
|
||||
return $this->connected;
|
||||
|
@ -470,7 +470,7 @@ class DboSource extends DataSource {
|
|||
* @param Model $model
|
||||
* @param array $fields
|
||||
* @param array $values
|
||||
* @return bool Success
|
||||
* @return boolean Success
|
||||
*/
|
||||
function create(&$model, $fields = null, $values = null) {
|
||||
$fieldInsert = array();
|
||||
|
@ -1284,7 +1284,7 @@ class DboSource extends DataSource {
|
|||
*
|
||||
* @param Model $model
|
||||
* @param mixed $conditions
|
||||
* @return bool Success
|
||||
* @return boolean Success
|
||||
*/
|
||||
function delete(&$model, $conditions = null) {
|
||||
$query = $this->defaultConditions($model, $conditions);
|
||||
|
@ -1794,7 +1794,7 @@ class DboSource extends DataSource {
|
|||
*
|
||||
* @param Model $model Model to search
|
||||
* @param string $sql SQL WHERE clause (condition only, not the "WHERE" part)
|
||||
* @return bool True if the table has a matching record, else false
|
||||
* @return boolean True if the table has a matching record, else false
|
||||
*/
|
||||
function hasAny($model, $sql) {
|
||||
$sql = $this->conditions($sql);
|
||||
|
|
|
@ -556,7 +556,7 @@ class Model extends Overloadable {
|
|||
*
|
||||
* @param array $params
|
||||
* @param bool $reset
|
||||
* @return bool Always true
|
||||
* @return boolean Always true
|
||||
*/
|
||||
function bindModel($params, $reset = true) {
|
||||
|
||||
|
@ -593,7 +593,7 @@ class Model extends Overloadable {
|
|||
*
|
||||
* @param array $params
|
||||
* @param bool $reset
|
||||
* @return bool Always true
|
||||
* @return boolean Always true
|
||||
*/
|
||||
function unbindModel($params, $reset = true) {
|
||||
foreach ($params as $assoc => $models) {
|
||||
|
@ -1031,7 +1031,7 @@ class Model extends Overloadable {
|
|||
* @param string $name Name of the table field
|
||||
* @param mixed $value Value of the field
|
||||
* @param bool $validate Whether or not this model should validate before saving (defaults to false)
|
||||
* @return bool True on success save
|
||||
* @return boolean True on success save
|
||||
*/
|
||||
function saveField($name, $value, $validate = false) {
|
||||
return $this->save(array($this->name => array($name => $value)), $validate, array($name));
|
||||
|
@ -1043,7 +1043,7 @@ class Model extends Overloadable {
|
|||
* @param array $data Data to save.
|
||||
* @param bool $validate If set, validation will be done before the save
|
||||
* @param array $fieldList List of fields to allow to be written
|
||||
* @return bool success
|
||||
* @return boolean success
|
||||
*/
|
||||
function save($data = null, $validate = true, $fieldList = array()) {
|
||||
$db =& ConnectionManager::getDataSource($this->useDbConfig);
|
||||
|
@ -1241,7 +1241,7 @@ class Model extends Overloadable {
|
|||
*
|
||||
* @param mixed $conditions
|
||||
* @param mixed $fields
|
||||
* @return bool True on success, false on failure
|
||||
* @return boolean True on success, false on failure
|
||||
*/
|
||||
function updateAll($fields, $conditions = true) {
|
||||
$db =& ConnectionManager::getDataSource($this->useDbConfig);
|
||||
|
@ -1252,7 +1252,7 @@ class Model extends Overloadable {
|
|||
*
|
||||
* @param mixed $id
|
||||
* @see function del
|
||||
* @return bool True on success
|
||||
* @return boolean True on success
|
||||
*/
|
||||
function remove($id = null, $cascade = true) {
|
||||
return $this->del($id, $cascade);
|
||||
|
@ -1261,7 +1261,7 @@ class Model extends Overloadable {
|
|||
* Removes record for given id. If no id is given, the current id is used. Returns true on success.
|
||||
*
|
||||
* @param mixed $id Id of record to delete
|
||||
* @return bool True on success
|
||||
* @return boolean True on success
|
||||
*/
|
||||
function del($id = null, $cascade = true) {
|
||||
if (!empty($id)) {
|
||||
|
@ -1304,7 +1304,7 @@ class Model extends Overloadable {
|
|||
* Alias for del()
|
||||
*
|
||||
* @param mixed $id Id of record to delete
|
||||
* @return bool True on success
|
||||
* @return boolean True on success
|
||||
*/
|
||||
function delete($id = null, $cascade = true) {
|
||||
return $this->del($id, $cascade);
|
||||
|
@ -1371,7 +1371,7 @@ class Model extends Overloadable {
|
|||
*
|
||||
* @param mixed $conditions
|
||||
* @param mixed $fields
|
||||
* @return bool True on success, false on failure
|
||||
* @return boolean True on success, false on failure
|
||||
*/
|
||||
function deleteAll($conditions, $cascade = true) {
|
||||
if (empty($conditions)) {
|
||||
|
@ -1395,7 +1395,7 @@ class Model extends Overloadable {
|
|||
* Returns true if a record with set id exists.
|
||||
*
|
||||
* @param bool $reset if true will force database query
|
||||
* @return bool True if such a record exists
|
||||
* @return boolean True if such a record exists
|
||||
*/
|
||||
function exists($reset = false) {
|
||||
if ($this->getID() === false) {
|
||||
|
@ -1410,7 +1410,7 @@ class Model extends Overloadable {
|
|||
* Returns true if a record that meets given conditions exists
|
||||
*
|
||||
* @param array $conditions SQL conditions array
|
||||
* @return bool True if such a record exists
|
||||
* @return boolean True if such a record exists
|
||||
*/
|
||||
function hasAny($conditions = null) {
|
||||
return ($this->find('count', array('conditions' => $conditions, 'recursive' => -1)) != false);
|
||||
|
@ -1618,7 +1618,7 @@ class Model extends Overloadable {
|
|||
*
|
||||
* @param array $fields Field/value pairs to search (if no values specified, they are pulled from $this->data)
|
||||
* @param bool $or If false, all fields specified must match in order for a false return value
|
||||
* @return bool False if any records matching any fields are found
|
||||
* @return boolean False if any records matching any fields are found
|
||||
*/
|
||||
function isUnique($fields, $or = true) {
|
||||
if (!is_array($fields)) {
|
||||
|
@ -1729,7 +1729,7 @@ class Model extends Overloadable {
|
|||
/**
|
||||
* Returns true if all fields pass validation, otherwise false.
|
||||
*
|
||||
* @return bool True if there are no errors
|
||||
* @return boolean True if there are no errors
|
||||
*/
|
||||
function validates($data = array()) {
|
||||
if (!empty($data)) {
|
||||
|
@ -2024,7 +2024,7 @@ class Model extends Overloadable {
|
|||
* Sets the DataSource to which this model is bound
|
||||
*
|
||||
* @param string $dataSource The name of the DataSource, as defined in Connections.php
|
||||
* @return bool True on success
|
||||
* @return boolean True on success
|
||||
*/
|
||||
function setDataSource($dataSource = null) {
|
||||
if ($dataSource != null) {
|
||||
|
@ -2091,7 +2091,7 @@ class Model extends Overloadable {
|
|||
* Before find callback
|
||||
*
|
||||
* @param array $queryData Data used to execute this query, i.e. conditions, order, etc.
|
||||
* @return bool True if the operation should continue, false if it should abort
|
||||
* @return boolean True if the operation should continue, false if it should abort
|
||||
*/
|
||||
function beforeFind($queryData) {
|
||||
return true;
|
||||
|
@ -2109,7 +2109,7 @@ class Model extends Overloadable {
|
|||
/**
|
||||
* Before save callback
|
||||
*
|
||||
* @return bool True if the operation should continue, false if it should abort
|
||||
* @return boolean True if the operation should continue, false if it should abort
|
||||
*/
|
||||
function beforeSave() {
|
||||
return true;
|
||||
|
@ -2124,7 +2124,7 @@ class Model extends Overloadable {
|
|||
/**
|
||||
* Before delete callback
|
||||
*
|
||||
* @return bool True if the operation should continue, false if it should abort
|
||||
* @return boolean True if the operation should continue, false if it should abort
|
||||
*/
|
||||
function beforeDelete() {
|
||||
return true;
|
||||
|
@ -2154,7 +2154,7 @@ class Model extends Overloadable {
|
|||
*
|
||||
* @param string $type If null this deletes cached views if Cache.check is true
|
||||
* Will be used to allow deleting query cache also
|
||||
* @return bool true on delete
|
||||
* @return boolean true on delete
|
||||
*/
|
||||
function _clearCache($type = null) {
|
||||
if ($type === null) {
|
||||
|
|
|
@ -181,7 +181,7 @@ class Object {
|
|||
*
|
||||
* @param string $name name of the class to persist
|
||||
* @param string $object the object to persist
|
||||
* @return bool Success
|
||||
* @return boolean Success
|
||||
* @access protected
|
||||
* @todo add examples to manual
|
||||
*/
|
||||
|
|
|
@ -74,7 +74,7 @@ class Overloadable extends Object {
|
|||
* @param string $method Method name
|
||||
* @param array $params Parameters to send to method
|
||||
* @param mixed $return Where to store return value from method
|
||||
* @return bool Success
|
||||
* @return boolean Success
|
||||
* @access private
|
||||
*/
|
||||
function __call($method, $params, &$return) {
|
||||
|
@ -126,7 +126,7 @@ class Overloadable2 extends Object {
|
|||
* @param string $method Method name
|
||||
* @param array $params Parameters to send to method
|
||||
* @param mixed $return Where to store return value from method
|
||||
* @return bool Success
|
||||
* @return boolean Success
|
||||
* @access private
|
||||
*/
|
||||
function __call($method, $params, &$return) {
|
||||
|
@ -142,7 +142,7 @@ class Overloadable2 extends Object {
|
|||
*
|
||||
* @param mixed $name What to get
|
||||
* @param mixed $value Where to store returned value
|
||||
* @return bool Success
|
||||
* @return boolean Success
|
||||
* @access private
|
||||
*/
|
||||
function __get($name, &$value) {
|
||||
|
@ -155,7 +155,7 @@ class Overloadable2 extends Object {
|
|||
*
|
||||
* @param mixed $name What to set
|
||||
* @param mixed $value Value to set
|
||||
* @return bool Success
|
||||
* @return boolean Success
|
||||
* @access private
|
||||
*/
|
||||
function __set($name, $value) {
|
||||
|
|
|
@ -89,7 +89,7 @@ class Overloadable2 extends Object {
|
|||
*
|
||||
* @param mixed $name What to get
|
||||
* @param mixed $value Where to store returned value
|
||||
* @return bool Success
|
||||
* @return boolean Success
|
||||
* @access private
|
||||
*/
|
||||
function __get($name) {
|
||||
|
@ -101,7 +101,7 @@ class Overloadable2 extends Object {
|
|||
*
|
||||
* @param mixed $name What to set
|
||||
* @param mixed $value Value to set
|
||||
* @return bool Success
|
||||
* @return boolean Success
|
||||
* @access private
|
||||
*/
|
||||
function __set($name, $value) {
|
||||
|
|
|
@ -592,7 +592,7 @@ class Router extends Object {
|
|||
*
|
||||
* @param $which A zero-based array index representing the route to move. For example,
|
||||
* if 3 routes have been added, the last route would be 2.
|
||||
* @return bool Retuns false if no route exists at the position specified by $which.
|
||||
* @return boolean Retuns false if no route exists at the position specified by $which.
|
||||
* @access public
|
||||
* @static
|
||||
*/
|
||||
|
|
|
@ -97,7 +97,7 @@ class Security extends Object {
|
|||
* Validate authorization hash.
|
||||
*
|
||||
* @param string $authKey Authorization hash
|
||||
* @return bool Success
|
||||
* @return boolean Success
|
||||
* @access public
|
||||
* @static
|
||||
*/
|
||||
|
|
|
@ -160,7 +160,7 @@ class CakeSession extends Object {
|
|||
* Returns true if given variable is set in session.
|
||||
*
|
||||
* @param string $name Variable name to check for
|
||||
* @return bool True if variable is there
|
||||
* @return boolean True if variable is there
|
||||
* @access public
|
||||
*/
|
||||
function check($name) {
|
||||
|
@ -199,7 +199,7 @@ class CakeSession extends Object {
|
|||
* Removes a variable from session.
|
||||
*
|
||||
* @param string $name Session variable to remove
|
||||
* @return bool Success
|
||||
* @return boolean Success
|
||||
* @access public
|
||||
*/
|
||||
function del($name) {
|
||||
|
@ -262,7 +262,7 @@ class CakeSession extends Object {
|
|||
/**
|
||||
* Returns true if session is valid.
|
||||
*
|
||||
* @return bool Success
|
||||
* @return boolean Success
|
||||
* @access public
|
||||
*/
|
||||
function valid() {
|
||||
|
@ -350,7 +350,7 @@ class CakeSession extends Object {
|
|||
*
|
||||
* @param mixed $name Name of variable
|
||||
* @param string $value Value to write
|
||||
* @return bool True if the write was successful, false if the write failed
|
||||
* @return boolean True if the write was successful, false if the write failed
|
||||
* @access public
|
||||
*/
|
||||
function write($name, $value) {
|
||||
|
@ -590,7 +590,7 @@ class CakeSession extends Object {
|
|||
/**
|
||||
* Method called on open of a database session.
|
||||
*
|
||||
* @return bool Success
|
||||
* @return boolean Success
|
||||
* @access private
|
||||
*/
|
||||
function __open() {
|
||||
|
@ -599,7 +599,7 @@ class CakeSession extends Object {
|
|||
/**
|
||||
* Method called on close of a database session.
|
||||
*
|
||||
* @return bool Success
|
||||
* @return boolean Success
|
||||
* @access private
|
||||
*/
|
||||
function __close() {
|
||||
|
@ -636,7 +636,7 @@ class CakeSession extends Object {
|
|||
*
|
||||
* @param mixed $key The name of the var
|
||||
* @param mixed $value The value of the var
|
||||
* @return bool Success
|
||||
* @return boolean Success
|
||||
* @access private
|
||||
*/
|
||||
function __write($key, $value) {
|
||||
|
@ -679,7 +679,7 @@ class CakeSession extends Object {
|
|||
* Method called on the destruction of a database session.
|
||||
*
|
||||
* @param int $key Key that uniquely identifies session in database
|
||||
* @return bool Success
|
||||
* @return boolean Success
|
||||
* @access private
|
||||
*/
|
||||
function __destroy($key) {
|
||||
|
@ -692,7 +692,7 @@ class CakeSession extends Object {
|
|||
* Helper function called on gc for database sessions.
|
||||
*
|
||||
* @param int $expires Timestamp (defaults to current time)
|
||||
* @return bool Success
|
||||
* @return boolean Success
|
||||
* @access private
|
||||
*/
|
||||
function __gc($expires = null) {
|
||||
|
|
|
@ -253,7 +253,7 @@ class Set extends Object {
|
|||
* Checks to see if all the values in the array are numeric
|
||||
*
|
||||
* @param array $array The array to check. If null, the value of the current Set object
|
||||
* @return bool true if values are numeric, false otherwise
|
||||
* @return boolean true if values are numeric, false otherwise
|
||||
* @access public
|
||||
*/
|
||||
function numeric($array = null) {
|
||||
|
@ -484,7 +484,7 @@ class Set extends Object {
|
|||
*
|
||||
* @param mixed $data Data to check on
|
||||
* @param mixed $path A dot-separated string.
|
||||
* @return bool true if path is found, false otherwise
|
||||
* @return boolean true if path is found, false otherwise
|
||||
* @access public
|
||||
*/
|
||||
function check($data, $path = null) {
|
||||
|
@ -557,7 +557,7 @@ class Set extends Object {
|
|||
*
|
||||
* @param array $val1 First value
|
||||
* @param array $val2 Second value
|
||||
* @return bool true if they are equal, false otherwise
|
||||
* @return boolean true if they are equal, false otherwise
|
||||
* @access public
|
||||
*/
|
||||
function isEqual($val1, $val2 = null) {
|
||||
|
@ -573,7 +573,7 @@ class Set extends Object {
|
|||
*
|
||||
* @param array $val1 First value
|
||||
* @param array $val2 Second value
|
||||
* @return bool true if $val1 contains $val2, false otherwise
|
||||
* @return boolean true if $val1 contains $val2, false otherwise
|
||||
* @access public
|
||||
*/
|
||||
function contains($val1, $val2 = null) {
|
||||
|
|
|
@ -106,7 +106,7 @@ class CakeSocket extends Object {
|
|||
/**
|
||||
* Connect the socket to the given host and port.
|
||||
*
|
||||
* @return bool Success
|
||||
* @return boolean Success
|
||||
* @access public
|
||||
*/
|
||||
function connect() {
|
||||
|
@ -196,7 +196,7 @@ class CakeSocket extends Object {
|
|||
* Write data to the socket.
|
||||
*
|
||||
* @param string $data The data to write to the socket
|
||||
* @return bool Success
|
||||
* @return boolean Success
|
||||
* @access public
|
||||
*/
|
||||
function write($data) {
|
||||
|
@ -233,7 +233,7 @@ class CakeSocket extends Object {
|
|||
/**
|
||||
* Abort socket operation.
|
||||
*
|
||||
* @return bool Success
|
||||
* @return boolean Success
|
||||
* @access public
|
||||
*/
|
||||
function abort() {
|
||||
|
@ -241,7 +241,7 @@ class CakeSocket extends Object {
|
|||
/**
|
||||
* Disconnect the socket from the current connection.
|
||||
*
|
||||
* @return bool Success
|
||||
* @return boolean Success
|
||||
* @access public
|
||||
*/
|
||||
function disconnect() {
|
||||
|
|
|
@ -115,7 +115,7 @@ class Validation extends Object {
|
|||
* array('check' => 'valueToCheck');
|
||||
*
|
||||
* @param mixed $check Value to check
|
||||
* @return bool Success
|
||||
* @return boolean Success
|
||||
* @access public
|
||||
*/
|
||||
function alphaNumeric($check) {
|
||||
|
@ -145,7 +145,7 @@ class Validation extends Object {
|
|||
* @param string $check Value to check for length
|
||||
* @param int $min Minimum value in range (inclusive)
|
||||
* @param int $max Maximum value in range (inclusive)
|
||||
* @return bool Success
|
||||
* @return boolean Success
|
||||
* @access public
|
||||
*/
|
||||
function between($check, $min, $max) {
|
||||
|
@ -165,7 +165,7 @@ class Validation extends Object {
|
|||
* array('check' => 'valueToCheck');
|
||||
*
|
||||
* @param mixed $check Value to check
|
||||
* @return bool Success
|
||||
* @return boolean Success
|
||||
* @access public
|
||||
*/
|
||||
function blank($check) {
|
||||
|
@ -193,7 +193,7 @@ class Validation extends Object {
|
|||
* Example: array('amex', 'bankcard', 'maestro')
|
||||
* @param bool $deep set to true this will check the Luhn algorithm of the credit card.
|
||||
* @param string $regex A custom regex can also be passed, this will be used instead of the defined regex values
|
||||
* @return bool Success
|
||||
* @return boolean Success
|
||||
* @access public
|
||||
* @see Validation::_luhn()
|
||||
*/
|
||||
|
@ -331,7 +331,7 @@ class Validation extends Object {
|
|||
* @param mixed $check When used as a string, $regex must also be a valid regular expression.
|
||||
* As and array: array('check' => value, 'regex' => 'valid regular expression')
|
||||
* @param string $regex If $check is passed as a string, $regex must also be set to valid regular expression
|
||||
* @return bool Success
|
||||
* @return boolean Success
|
||||
* @access public
|
||||
*/
|
||||
function custom($check, $regex = null) {
|
||||
|
@ -361,7 +361,7 @@ class Validation extends Object {
|
|||
* My December 2006 or Dec 2006
|
||||
* my 12/2006 or 12/06 separators can be a space, period, dash, forward slash
|
||||
* @param string $regex If a custom regular expression is used this is the only validation that will occur.
|
||||
* @return bool Success
|
||||
* @return boolean Success
|
||||
* @access public
|
||||
*/
|
||||
function date($check, $format = 'ymd', $regex = null) {
|
||||
|
@ -406,7 +406,7 @@ class Validation extends Object {
|
|||
* @param int $check The value the test for decimal
|
||||
* @param int $places if set $check value must have exactly $places after the decimal point
|
||||
* @param string $regex If a custom regular expression is used this is the only validation that will occur.
|
||||
* @return bool Success
|
||||
* @return boolean Success
|
||||
* @access public
|
||||
*/
|
||||
function decimal($check, $places = null, $regex = null) {
|
||||
|
@ -432,7 +432,7 @@ class Validation extends Object {
|
|||
* @param string $check Value to check
|
||||
* @param bool $deep Perform a deeper validation (if true), by also checking availability of host
|
||||
* @param string $regex Regex to use (if none it will use built in regex)
|
||||
* @return bool Success
|
||||
* @return boolean Success
|
||||
* @access public
|
||||
*/
|
||||
function email($check, $deep = false, $regex= null) {
|
||||
|
@ -487,7 +487,7 @@ class Validation extends Object {
|
|||
* Validation of an IPv4 address.
|
||||
*
|
||||
* @param string $check The string to test.
|
||||
* @return bool Success
|
||||
* @return boolean Success
|
||||
* @access public
|
||||
*/
|
||||
function ip($check) {
|
||||
|
@ -508,7 +508,7 @@ class Validation extends Object {
|
|||
*
|
||||
* @param string $check The string to test
|
||||
* @param int $min The minimal string length
|
||||
* @return bool Success
|
||||
* @return boolean Success
|
||||
* @access public
|
||||
*/
|
||||
function minLength($check, $min) {
|
||||
|
@ -520,7 +520,7 @@ class Validation extends Object {
|
|||
*
|
||||
* @param string $check The string to test
|
||||
* @param int $max The maximal string length
|
||||
* @return bool Success
|
||||
* @return boolean Success
|
||||
* @access public
|
||||
*/
|
||||
function maxLength($check, $max) {
|
||||
|
@ -532,7 +532,7 @@ class Validation extends Object {
|
|||
*
|
||||
* @param string $check Value to check
|
||||
* @param string $symbolPosition Where symbol is located (left/right)
|
||||
* @return bool Success
|
||||
* @return boolean Success
|
||||
* @access public
|
||||
*/
|
||||
function money($check, $symbolPosition = 'left') {
|
||||
|
@ -582,7 +582,7 @@ class Validation extends Object {
|
|||
* Checks if a value is numeric.
|
||||
*
|
||||
* @param string $check Value to check
|
||||
* @return bool Succcess
|
||||
* @return boolean Succcess
|
||||
* @access public
|
||||
*/
|
||||
function numeric($check) {
|
||||
|
@ -594,7 +594,7 @@ class Validation extends Object {
|
|||
* @param mixed $check Value to check (string or array)
|
||||
* @param string $regex Regular expression to use
|
||||
* @param string $country Country code (defaults to 'all')
|
||||
* @return bool Success
|
||||
* @return boolean Success
|
||||
* @access public
|
||||
*/
|
||||
function phone($check, $regex= null, $country = 'all') {
|
||||
|
@ -621,7 +621,7 @@ class Validation extends Object {
|
|||
* @param mixed $check Value to check
|
||||
* @param string $regex Regular expression to use
|
||||
* @param string $country Country to use for formatting
|
||||
* @return bool Success
|
||||
* @return boolean Success
|
||||
* @access public
|
||||
*/
|
||||
function postal($check, $regex= null, $country = null) {
|
||||
|
@ -654,7 +654,7 @@ class Validation extends Object {
|
|||
* @param mixed $check Value to check
|
||||
* @param string $regex Regular expression to use
|
||||
* @param string $country Country
|
||||
* @return bool Success
|
||||
* @return boolean Success
|
||||
* @access public
|
||||
*/
|
||||
function ssn($check, $regex = null, $country = null) {
|
||||
|
@ -685,7 +685,7 @@ class Validation extends Object {
|
|||
* Checks that a value is a valid URL.
|
||||
*
|
||||
* @param string $check Value to check
|
||||
* @return bool Success
|
||||
* @return boolean Success
|
||||
* @access public
|
||||
*/
|
||||
function url($check) {
|
||||
|
@ -711,7 +711,7 @@ class Validation extends Object {
|
|||
/**
|
||||
* Runs a regular expression match.
|
||||
*
|
||||
* @return bool Success of match
|
||||
* @return boolean Success of match
|
||||
* @access protected
|
||||
*/
|
||||
function _check() {
|
||||
|
@ -753,7 +753,7 @@ class Validation extends Object {
|
|||
* Luhn algorithm
|
||||
*
|
||||
* @see http://en.wikipedia.org/wiki/Luhn_algorithm
|
||||
* @return bool Success
|
||||
* @return boolean Success
|
||||
* @access protected
|
||||
*/
|
||||
function _luhn() {
|
||||
|
|
|
@ -373,7 +373,7 @@ class Helper extends Overloadable {
|
|||
*
|
||||
* @param string $model Model name as string
|
||||
* @param string $field Fieldname as string
|
||||
* @return bool True on errors.
|
||||
* @return boolean True on errors.
|
||||
*/
|
||||
function tagIsInvalid($model = null, $field = null) {
|
||||
if ($model == null) {
|
||||
|
|
|
@ -504,7 +504,7 @@ class AjaxHelper extends AppHelper {
|
|||
/**
|
||||
* Detects Ajax requests
|
||||
*
|
||||
* @return bool True if the current request is a Prototype Ajax update call
|
||||
* @return boolean True if the current request is a Prototype Ajax update call
|
||||
*/
|
||||
function isAjax() {
|
||||
return (isset($this->params['isAjax']) && $this->params['isAjax'] === true);
|
||||
|
|
|
@ -334,7 +334,7 @@ class FormHelper extends AppHelper {
|
|||
* Returns true if there is an error for the given field, otherwise false
|
||||
*
|
||||
* @param string $field This should be "Modelname.fieldname", "Modelname/fieldname" is deprecated
|
||||
* @return bool If there are errors this method returns true, else false.
|
||||
* @return boolean If there are errors this method returns true, else false.
|
||||
* @access public
|
||||
*/
|
||||
function isFieldError($field) {
|
||||
|
|
|
@ -179,7 +179,7 @@ class JavascriptHelper extends AppHelper {
|
|||
* @param string $event event to observe
|
||||
* @param string $observer function to call
|
||||
* @param bool $useCapture default true
|
||||
* @return bool true on success
|
||||
* @return boolean true on success
|
||||
*/
|
||||
function event($object, $event, $observer = null, $useCapture = false) {
|
||||
|
||||
|
|
|
@ -305,7 +305,7 @@ class PaginatorHelper extends AppHelper {
|
|||
* Returns true if the given result set is not at the first page
|
||||
*
|
||||
* @param string $model Optional model name. Uses the default if none is specified.
|
||||
* @return bool True if the result set is not at the first page.
|
||||
* @return boolean True if the result set is not at the first page.
|
||||
*/
|
||||
function hasPrev($model = null) {
|
||||
return $this->__hasPage($model, 'prev');
|
||||
|
@ -314,7 +314,7 @@ class PaginatorHelper extends AppHelper {
|
|||
* Returns true if the given result set is not at the last page
|
||||
*
|
||||
* @param string $model Optional model name. Uses the default if none is specified.
|
||||
* @return bool True if the result set is not at the last page.
|
||||
* @return boolean True if the result set is not at the last page.
|
||||
*/
|
||||
function hasNext($model = null) {
|
||||
return $this->__hasPage($model, 'next');
|
||||
|
@ -324,7 +324,7 @@ class PaginatorHelper extends AppHelper {
|
|||
*
|
||||
* @param string $model Optional model name. Uses the default if none is specified.
|
||||
* @param int $page The page number - if not set defaults to 1.
|
||||
* @return bool True if the given result set has the specified page number.
|
||||
* @return boolean True if the given result set has the specified page number.
|
||||
*/
|
||||
function hasPage($model = null, $page = 1) {
|
||||
if (is_numeric($model)) {
|
||||
|
|
|
@ -136,7 +136,7 @@ class TimeHelper extends AppHelper {
|
|||
* Returns true if given datetime string is today.
|
||||
*
|
||||
* @param string $date_string Datetime string or Unix timestamp
|
||||
* @return bool True if datetime string is today
|
||||
* @return boolean True if datetime string is today
|
||||
*/
|
||||
function isToday($date_string) {
|
||||
$date = $this->fromString($date_string);
|
||||
|
@ -146,7 +146,7 @@ class TimeHelper extends AppHelper {
|
|||
/**
|
||||
* Returns true if given datetime string is within this week
|
||||
* @param string $date_string
|
||||
* @return bool True if datetime string is within current week
|
||||
* @return boolean True if datetime string is within current week
|
||||
*/
|
||||
function isThisWeek($date_string) {
|
||||
$date = $this->fromString($date_string) + 86400;
|
||||
|
@ -155,7 +155,7 @@ class TimeHelper extends AppHelper {
|
|||
/**
|
||||
* Returns true if given datetime string is within this month
|
||||
* @param string $date_string
|
||||
* @return bool True if datetime string is within current month
|
||||
* @return boolean True if datetime string is within current month
|
||||
*/
|
||||
function isThisMonth($date_string) {
|
||||
$date = $this->fromString($date_string);
|
||||
|
@ -165,7 +165,7 @@ class TimeHelper extends AppHelper {
|
|||
* Returns true if given datetime string is within current year.
|
||||
*
|
||||
* @param string $date_string Datetime string or Unix timestamp
|
||||
* @return bool True if datetime string is within current year
|
||||
* @return boolean True if datetime string is within current year
|
||||
*/
|
||||
function isThisYear($date_string) {
|
||||
$date = $this->fromString($date_string);
|
||||
|
@ -176,7 +176,7 @@ class TimeHelper extends AppHelper {
|
|||
* Returns true if given datetime string was yesterday.
|
||||
*
|
||||
* @param string $date_string Datetime string or Unix timestamp
|
||||
* @return bool True if datetime string was yesterday
|
||||
* @return boolean True if datetime string was yesterday
|
||||
*/
|
||||
function wasYesterday($date_string) {
|
||||
$date = $this->fromString($date_string);
|
||||
|
@ -187,7 +187,7 @@ class TimeHelper extends AppHelper {
|
|||
* Returns true if given datetime string is tomorrow.
|
||||
*
|
||||
* @param string $date_string Datetime string or Unix timestamp
|
||||
* @return bool True if datetime string was yesterday
|
||||
* @return boolean True if datetime string was yesterday
|
||||
*/
|
||||
function isTomorrow($date_string) {
|
||||
$date = $this->fromString($date_string);
|
||||
|
|
|
@ -96,7 +96,7 @@ class XmlHelper extends AppHelper {
|
|||
*
|
||||
* @param string $name The namespace name
|
||||
* @param string $url The namespace URI; can be empty if in the default namespace map
|
||||
* @return bool False if no URL is specified, and the namespace does not exist
|
||||
* @return boolean False if no URL is specified, and the namespace does not exist
|
||||
* default namespace map, otherwise true
|
||||
*/
|
||||
function addNs($name, $url = null) {
|
||||
|
|
|
@ -520,7 +520,7 @@ class XML extends XMLNode {
|
|||
* Initialize XML object from a given XML string. Returns false on error.
|
||||
*
|
||||
* @param string $in XML string to initialize with
|
||||
* @return bool Success
|
||||
* @return boolean Success
|
||||
* @access public
|
||||
*/
|
||||
function load($in) {
|
||||
|
@ -554,7 +554,7 @@ class XML extends XMLNode {
|
|||
/**
|
||||
* Parses and creates XML nodes from the __rawData property.
|
||||
*
|
||||
* @return bool Success
|
||||
* @return boolean Success
|
||||
* @access public
|
||||
* @see load()
|
||||
*/
|
||||
|
|
Loading…
Add table
Reference in a new issue