mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2024-11-15 03:18:26 +00:00
Adjusted some types in @param, @return and @var.
This commit is contained in:
parent
4df585e15e
commit
895c10af7b
65 changed files with 192 additions and 209 deletions
|
@ -186,7 +186,7 @@ class Cache {
|
|||
* the Engine instance is also unset.
|
||||
*
|
||||
* @param string $name A currently configured cache config you wish to remove.
|
||||
* @return boolen success of the removal, returns false when the config does not exist.
|
||||
* @return boolean success of the removal, returns false when the config does not exist.
|
||||
*/
|
||||
public static function drop($name) {
|
||||
if (!isset(self::$_config[$name])) {
|
||||
|
@ -456,7 +456,7 @@ class Cache {
|
|||
* Check if Cache has initialized a working config for the given name.
|
||||
*
|
||||
* @param string $config name of the configuration to use. Defaults to 'default'
|
||||
* @return bool Whether or not the config name has been initialized.
|
||||
* @return boolean Whether or not the config name has been initialized.
|
||||
*/
|
||||
public static function isInitialized($config = 'default') {
|
||||
if (Configure::read('Cache.disable')) {
|
||||
|
@ -490,7 +490,7 @@ abstract class CacheEngine {
|
|||
/**
|
||||
* Settings of current engine instance
|
||||
*
|
||||
* @var int
|
||||
* @var array
|
||||
*/
|
||||
public $settings = array();
|
||||
|
||||
|
|
|
@ -30,7 +30,7 @@ class FileEngine extends CacheEngine {
|
|||
/**
|
||||
* Instance of SplFileObject class
|
||||
*
|
||||
* @var _File
|
||||
* @var File
|
||||
*/
|
||||
protected $_File = null;
|
||||
|
||||
|
|
|
@ -544,7 +544,7 @@ class AclShell extends Shell {
|
|||
*
|
||||
* @param string $class Class type you want (Aro/Aco)
|
||||
* @param mixed $identifier A mixed identifier for finding the node.
|
||||
* @return int Integer of NodeId. Will trigger an error if nothing is found.
|
||||
* @return integer Integer of NodeId. Will trigger an error if nothing is found.
|
||||
*/
|
||||
function _getNodeId($class, $identifier) {
|
||||
$node = $this->Acl->{$class}->node($identifier);
|
||||
|
|
|
@ -365,7 +365,7 @@ class ControllerTask extends BakeTask {
|
|||
* Common code for property choice handling.
|
||||
*
|
||||
* @param string $prompt A yes/no question to precede the list
|
||||
* @param sting $example A question for a comma separated list, with examples.
|
||||
* @param string $example A question for a comma separated list, with examples.
|
||||
* @return array Array of values for property.
|
||||
*/
|
||||
protected function _doPropertyChoices($prompt, $example) {
|
||||
|
|
|
@ -511,8 +511,8 @@ class ExtractTask extends Shell {
|
|||
/**
|
||||
* Get the strings from the position forward
|
||||
*
|
||||
* @param int $position Actual position on tokens array
|
||||
* @param int $target Number of strings to extract
|
||||
* @param integer $position Actual position on tokens array
|
||||
* @param integer $target Number of strings to extract
|
||||
* @return array Strings extracted
|
||||
*/
|
||||
protected function _getStrings(&$position, $target) {
|
||||
|
|
|
@ -43,7 +43,7 @@ class FixtureTask extends BakeTask {
|
|||
/**
|
||||
* Schema instance
|
||||
*
|
||||
* @var object
|
||||
* @var CakeSchema
|
||||
*/
|
||||
protected $_Schema = null;
|
||||
|
||||
|
|
|
@ -146,7 +146,7 @@ class ModelTask extends BakeTask {
|
|||
* @param array $options Array of options to use for the selections. indexes must start at 0
|
||||
* @param string $prompt Prompt to use for options list.
|
||||
* @param integer $default The default option for the given prompt.
|
||||
* @return result of user choice.
|
||||
* @return integer result of user choice.
|
||||
*/
|
||||
public function inOptions($options, $prompt = null, $default = null) {
|
||||
$valid = false;
|
||||
|
@ -312,7 +312,7 @@ class ModelTask extends BakeTask {
|
|||
/**
|
||||
* Handles Generation and user interaction for creating validation.
|
||||
*
|
||||
* @param object $model Model to have validations generated for.
|
||||
* @param Model $model Model to have validations generated for.
|
||||
* @return array $validate Array of user selected validations.
|
||||
*/
|
||||
public function doValidation($model) {
|
||||
|
@ -448,7 +448,7 @@ class ModelTask extends BakeTask {
|
|||
/**
|
||||
* Handles associations
|
||||
*
|
||||
* @param object $model
|
||||
* @param Model $model
|
||||
* @return array $assocaitons
|
||||
*/
|
||||
public function doAssociations($model) {
|
||||
|
@ -497,7 +497,7 @@ class ModelTask extends BakeTask {
|
|||
/**
|
||||
* Find belongsTo relations and add them to the associations list.
|
||||
*
|
||||
* @param object $model Model instance of model being generated.
|
||||
* @param Model $model Model instance of model being generated.
|
||||
* @param array $associations Array of inprogress associations
|
||||
* @return array $associations with belongsTo added in.
|
||||
*/
|
||||
|
@ -526,7 +526,7 @@ class ModelTask extends BakeTask {
|
|||
/**
|
||||
* Find the hasOne and HasMany relations and add them to associations list
|
||||
*
|
||||
* @param object $model Model instance being generated
|
||||
* @param Model $model Model instance being generated
|
||||
* @param array $associations Array of inprogress associations
|
||||
* @return array $associations with hasOne and hasMany added in.
|
||||
*/
|
||||
|
@ -569,7 +569,7 @@ class ModelTask extends BakeTask {
|
|||
/**
|
||||
* Find the hasAndBelongsToMany relations and add them to associations list
|
||||
*
|
||||
* @param object $model Model instance being generated
|
||||
* @param Model $model Model instance being generated
|
||||
* @param array $associations Array of in-progress associations
|
||||
* @return array $associations with hasAndBelongsToMany added in.
|
||||
*/
|
||||
|
@ -635,7 +635,7 @@ class ModelTask extends BakeTask {
|
|||
/**
|
||||
* Interact with the user and generate additional non-conventional associations
|
||||
*
|
||||
* @param object $model Temporary model instance
|
||||
* @param Model $model Temporary model instance
|
||||
* @param array $associations Array of associations.
|
||||
* @return array Array of associations.
|
||||
*/
|
||||
|
|
|
@ -102,7 +102,7 @@ class TemplateTask extends Shell {
|
|||
/**
|
||||
* Set variable values to the template scope
|
||||
*
|
||||
* @param mixed $one A string or an array of data.
|
||||
* @param string|array $one A string or an array of data.
|
||||
* @param mixed $two Value in case $one is a string (which then works as the key).
|
||||
* Unused if $one is an associative array, otherwise serves as the values to $one's keys.
|
||||
* @return void
|
||||
|
@ -129,8 +129,8 @@ class TemplateTask extends Shell {
|
|||
*
|
||||
* @param string $directory directory / type of thing you want
|
||||
* @param string $filename template name
|
||||
* @param string $vars Additional vars to set to template scope.
|
||||
* @return contents of generated code template
|
||||
* @param array $vars Additional vars to set to template scope.
|
||||
* @return string contents of generated code template
|
||||
*/
|
||||
public function generate($directory, $filename, $vars = null) {
|
||||
if ($vars !== null) {
|
||||
|
|
|
@ -64,10 +64,10 @@ class ConsoleErrorHandler extends ErrorHandler {
|
|||
* Handle errors in the console environment. Writes errors to stderr,
|
||||
* and logs messages if Configure::read('debug') is 0.
|
||||
*
|
||||
* @param int $code Error code
|
||||
* @param integer $code Error code
|
||||
* @param string $description Description of the error.
|
||||
* @param string $file The file the error occurred in.
|
||||
* @param int $line The line the error occurred on.
|
||||
* @param integer $line The line the error occurred on.
|
||||
* @param array $context The backtrace of the error.
|
||||
* @return void
|
||||
*/
|
||||
|
|
|
@ -84,7 +84,7 @@ class ConsoleInputArgument {
|
|||
/**
|
||||
* Generate the help for this argument.
|
||||
*
|
||||
* @param int $width The width to make the name of the option.
|
||||
* @param integer $width The width to make the name of the option.
|
||||
* @return string
|
||||
*/
|
||||
public function help($width = 0) {
|
||||
|
|
|
@ -112,7 +112,7 @@ class ConsoleInputOption {
|
|||
/**
|
||||
* Generate the help for this this option.
|
||||
*
|
||||
* @param int $width The width to make the name of the option.
|
||||
* @param integer $width The width to make the name of the option.
|
||||
* @return string
|
||||
*/
|
||||
public function help($width = 0) {
|
||||
|
|
|
@ -82,7 +82,7 @@ class ConsoleInputSubcommand {
|
|||
/**
|
||||
* Generate the help for this this subcommand.
|
||||
*
|
||||
* @param int $width The width to make the name of the subcommand.
|
||||
* @param integer $width The width to make the name of the subcommand.
|
||||
* @return string
|
||||
*/
|
||||
public function help($width = 0) {
|
||||
|
|
|
@ -489,7 +489,7 @@ class ConsoleOptionParser {
|
|||
* @param string $subcommand If present and a valid subcommand that has a linked parser.
|
||||
* That subcommands help will be shown instead.
|
||||
* @param string $format Define the output format, can be text or xml
|
||||
* @param int $width The width to format user content to. Defaults to 72
|
||||
* @param integer $width The width to format user content to. Defaults to 72
|
||||
* @return string Generated help.
|
||||
*/
|
||||
public function help($subcommand = null, $format = 'text', $width = 72) {
|
||||
|
@ -605,8 +605,7 @@ class ConsoleOptionParser {
|
|||
/**
|
||||
* Find the next token in the argv set.
|
||||
*
|
||||
* @param string
|
||||
* @return next token or ''
|
||||
* @return string next token or ''
|
||||
*/
|
||||
protected function _nextToken() {
|
||||
return isset($this->_tokens[0]) ? $this->_tokens[0] : '';
|
||||
|
|
|
@ -266,7 +266,7 @@ class ConsoleOutput {
|
|||
/**
|
||||
* Get/Set the output type to use. The output type how formatting tags are treated.
|
||||
*
|
||||
* @param int $type The output type to use. Should be one of the class constants.
|
||||
* @param integer $type The output type to use. Should be one of the class constants.
|
||||
* @return mixed Either null or the value if getting.
|
||||
*/
|
||||
public function outputAs($type = null) {
|
||||
|
@ -279,7 +279,6 @@ class ConsoleOutput {
|
|||
/**
|
||||
* clean up and close handles
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function __destruct() {
|
||||
fclose($this->_output);
|
||||
|
|
|
@ -214,7 +214,7 @@ class Shell extends Object {
|
|||
* makes $this->AppModel available to subclasses
|
||||
* If public $uses is an array of models will load those models
|
||||
*
|
||||
* @return bool
|
||||
* @return boolean
|
||||
*/
|
||||
protected function _loadModels() {
|
||||
if ($this->uses === null || $this->uses === false) {
|
||||
|
@ -243,7 +243,7 @@ class Shell extends Object {
|
|||
/**
|
||||
* Loads tasks defined in public $tasks
|
||||
*
|
||||
* @return bool
|
||||
* @return boolean
|
||||
*/
|
||||
public function loadTasks() {
|
||||
if ($this->tasks === true || empty($this->tasks) || empty($this->Tasks)) {
|
||||
|
@ -670,7 +670,7 @@ class Shell extends Object {
|
|||
* Makes absolute file path easier to read
|
||||
*
|
||||
* @param string $file Absolute file path
|
||||
* @return sting short path
|
||||
* @return string short path
|
||||
*/
|
||||
public function shortPath($file) {
|
||||
$shortPath = str_replace(ROOT, null, $file);
|
||||
|
|
|
@ -44,8 +44,7 @@ class ShellDispatcher {
|
|||
* a status code of either 0 or 1 according to the result of the dispatch.
|
||||
*
|
||||
* @param array $args the argv from PHP
|
||||
* @param bool $bootstrap Should the environment be bootstrapped.
|
||||
* @return void
|
||||
* @param boolean $bootstrap Should the environment be bootstrapped.
|
||||
*/
|
||||
public function __construct($args = array(), $bootstrap = true) {
|
||||
set_time_limit(0);
|
||||
|
|
|
@ -42,7 +42,6 @@ class TaskCollection extends ObjectCollection {
|
|||
* Constructor
|
||||
*
|
||||
* @param Shell $Shell
|
||||
* @return void
|
||||
*/
|
||||
public function __construct(Shell $Shell) {
|
||||
$this->_Shell = $Shell;
|
||||
|
|
|
@ -39,7 +39,6 @@ class CakeErrorController extends AppController {
|
|||
*
|
||||
* @param CakeRequest $request
|
||||
* @param CakeResponse $response
|
||||
* @return void
|
||||
*/
|
||||
public function __construct($request = null, $response = null) {
|
||||
parent::__construct($request, $response);
|
||||
|
|
|
@ -86,7 +86,7 @@ class Component extends Object {
|
|||
/**
|
||||
* Magic method for lazy loading $components.
|
||||
*
|
||||
* @param sting $name Name of component to get.
|
||||
* @param string $name Name of component to get.
|
||||
* @return mixed A Component object or null.
|
||||
*/
|
||||
public function __get($name) {
|
||||
|
@ -102,7 +102,7 @@ class Component extends Object {
|
|||
/**
|
||||
* Called before the Controller::beforeFilter().
|
||||
*
|
||||
* @param object $controller Controller with components to initialize
|
||||
* @param Controller $controller Controller with components to initialize
|
||||
* @return void
|
||||
* @link http://book.cakephp.org/view/998/MVC-Class-Access-Within-Components
|
||||
*/
|
||||
|
@ -111,7 +111,7 @@ class Component extends Object {
|
|||
/**
|
||||
* Called after the Controller::beforeFilter() and before the controller action
|
||||
*
|
||||
* @param object $controller Controller with components to startup
|
||||
* @param Controller $controller Controller with components to startup
|
||||
* @return void
|
||||
* @link http://book.cakephp.org/view/998/MVC-Class-Access-Within-Components
|
||||
*/
|
||||
|
@ -121,7 +121,7 @@ class Component extends Object {
|
|||
* Called after the Controller::beforeRender(), after the view class is loaded, and before the
|
||||
* Controller::render()
|
||||
*
|
||||
* @param object $controller Controller with components to beforeRender
|
||||
* @param Controller $controller Controller with components to beforeRender
|
||||
* @return void
|
||||
*/
|
||||
public function beforeRender($controller) { }
|
||||
|
@ -129,7 +129,7 @@ class Component extends Object {
|
|||
/**
|
||||
* Called after Controller::render() and before the output is printed to the browser.
|
||||
*
|
||||
* @param object $controller Controller with components to shutdown
|
||||
* @param Controller $controller Controller with components to shutdown
|
||||
* @return void
|
||||
*/
|
||||
public function shutdown($controller) { }
|
||||
|
@ -146,11 +146,11 @@ class Component extends Object {
|
|||
* If your response is a string or an array that does not contain a 'url' key it will
|
||||
* be used as the new url to redirect to.
|
||||
*
|
||||
* @param object $controller Controller with components to beforeRedirect
|
||||
* @param mixed $url Either the string or url array that is being redirected to.
|
||||
* @param int $status The status code of the redirect
|
||||
* @param bool $exit Will the script exit.
|
||||
* @return mixed Either an array or null.
|
||||
* @param Controller $controller Controller with components to beforeRedirect
|
||||
* @param string|array $url Either the string or url array that is being redirected to.
|
||||
* @param integer $status The status code of the redirect
|
||||
* @param boolean $exit Will the script exit.
|
||||
* @return array|null Either an array or null.
|
||||
*/
|
||||
public function beforeRedirect($controller, $url, $status = null, $exit = true) {}
|
||||
|
||||
|
|
|
@ -36,7 +36,7 @@ class AclComponent extends Component {
|
|||
/**
|
||||
* Instance of an ACL class
|
||||
*
|
||||
* @var object
|
||||
* @var AclInterface
|
||||
*/
|
||||
protected $_Instance = null;
|
||||
|
||||
|
|
|
@ -240,7 +240,7 @@ class AuthComponent extends Component {
|
|||
/**
|
||||
* Initializes AuthComponent for use in the controller
|
||||
*
|
||||
* @param object $controller A reference to the instantiating controller object
|
||||
* @param Controller $controller A reference to the instantiating controller object
|
||||
* @return void
|
||||
*/
|
||||
public function initialize($controller) {
|
||||
|
@ -257,7 +257,7 @@ class AuthComponent extends Component {
|
|||
* Main execution method. Handles redirecting of invalid users, and processing
|
||||
* of login form data.
|
||||
*
|
||||
* @param object $controller A reference to the instantiating controller object
|
||||
* @param Controller $controller A reference to the instantiating controller object
|
||||
* @return boolean
|
||||
*/
|
||||
public function startup($controller) {
|
||||
|
|
|
@ -338,7 +338,7 @@ class CookieComponent extends Component {
|
|||
* CookieComponent::write(string, string, boolean, '5 Days');
|
||||
*
|
||||
* @param mixed $expires Can be either Unix timestamp, or date string
|
||||
* @return int Unix timestamp
|
||||
* @return integer Unix timestamp
|
||||
*/
|
||||
protected function _expire($expires = null) {
|
||||
$now = time();
|
||||
|
|
|
@ -249,7 +249,7 @@ class EmailComponent extends Component {
|
|||
/**
|
||||
* Controller reference
|
||||
*
|
||||
* @var object Controller
|
||||
* @var Controller
|
||||
*/
|
||||
protected $_controller = null;
|
||||
|
||||
|
@ -267,7 +267,7 @@ class EmailComponent extends Component {
|
|||
/**
|
||||
* Initialize component
|
||||
*
|
||||
* @param object $controller Instantiating controller
|
||||
* @param Controller $controller Instantiating controller
|
||||
* @return void
|
||||
*/
|
||||
public function initialize($controller) {
|
||||
|
|
|
@ -101,7 +101,7 @@ class RequestHandlerComponent extends Component {
|
|||
* HTTP_ACCEPT_TYPE is set to a single value that is a supported extension and mapped type.
|
||||
* If yes, RequestHandler::$ext is set to that value
|
||||
*
|
||||
* @param object $controller A reference to the controller
|
||||
* @param Controller $controller A reference to the controller
|
||||
* @param array $settings Array of settings to _set().
|
||||
* @return void
|
||||
* @see Router::parseExtensions()
|
||||
|
@ -142,7 +142,7 @@ class RequestHandlerComponent extends Component {
|
|||
* - If the XML data is POSTed, the data is parsed into an XML object, which is assigned
|
||||
* to the $data property of the controller, which can then be saved to a model object.
|
||||
*
|
||||
* @param object $controller A reference to the controller
|
||||
* @param Controller $controller A reference to the controller
|
||||
* @return void
|
||||
*/
|
||||
public function startup($controller) {
|
||||
|
@ -239,7 +239,7 @@ class RequestHandlerComponent extends Component {
|
|||
/**
|
||||
* Returns true if the current request is over HTTPS, false otherwise.
|
||||
*
|
||||
* @return bool True if call is over HTTPS
|
||||
* @return boolean True if call is over HTTPS
|
||||
* @deprecated use `$this->request->is('ssl')` instead.
|
||||
*/
|
||||
public function isSSL() {
|
||||
|
@ -286,7 +286,7 @@ class RequestHandlerComponent extends Component {
|
|||
/**
|
||||
* Returns true if the client accepts WAP content
|
||||
*
|
||||
* @return bool
|
||||
* @return boolean
|
||||
*/
|
||||
public function isWap() {
|
||||
return $this->prefers('wap');
|
||||
|
@ -509,7 +509,7 @@ class RequestHandlerComponent extends Component {
|
|||
*
|
||||
* `$this->RequestHandler->renderAs($this, 'xml', array('attachment' => 'myfile.xml');`
|
||||
*
|
||||
* @param object $controller A reference to a controller object
|
||||
* @param Controller $controller A reference to a controller object
|
||||
* @param string $type Type of response to send (e.g: 'ajax')
|
||||
* @param array $options Array of options to use
|
||||
* @return void
|
||||
|
|
|
@ -181,7 +181,7 @@ class SecurityComponent extends Component {
|
|||
/**
|
||||
* Component startup. All security checking happens here.
|
||||
*
|
||||
* @param object $controller Instantiating controller
|
||||
* @param Controller $controller Instantiating controller
|
||||
* @return void
|
||||
*/
|
||||
public function startup($controller) {
|
||||
|
@ -277,7 +277,7 @@ class SecurityComponent extends Component {
|
|||
* Black-hole an invalid request with a 404 error or custom callback. If SecurityComponent::$blackHoleCallback
|
||||
* is specified, it will use this callback by executing the method indicated in $error
|
||||
*
|
||||
* @param object $controller Instantiating controller
|
||||
* @param Controller $controller Instantiating controller
|
||||
* @param string $error Error method
|
||||
* @return mixed If specified, controller blackHoleCallback's response, or no return otherwise
|
||||
* @see SecurityComponent::$blackHoleCallback
|
||||
|
@ -313,8 +313,8 @@ class SecurityComponent extends Component {
|
|||
/**
|
||||
* Check if HTTP methods are required
|
||||
*
|
||||
* @param object $controller Instantiating controller
|
||||
* @return bool true if $method is required
|
||||
* @param Controller $controller Instantiating controller
|
||||
* @return boolean true if $method is required
|
||||
*/
|
||||
protected function _methodsRequired($controller) {
|
||||
foreach (array('Post', 'Get', 'Put', 'Delete') as $method) {
|
||||
|
@ -336,8 +336,8 @@ class SecurityComponent extends Component {
|
|||
/**
|
||||
* Check if access requires secure connection
|
||||
*
|
||||
* @param object $controller Instantiating controller
|
||||
* @return bool true if secure connection required
|
||||
* @param Controller $controller Instantiating controller
|
||||
* @return boolean true if secure connection required
|
||||
*/
|
||||
protected function _secureRequired($controller) {
|
||||
if (is_array($this->requireSecure) && !empty($this->requireSecure)) {
|
||||
|
@ -357,8 +357,8 @@ class SecurityComponent extends Component {
|
|||
/**
|
||||
* Check if authentication is required
|
||||
*
|
||||
* @param object $controller Instantiating controller
|
||||
* @return bool true if authentication required
|
||||
* @param Controller $controller Instantiating controller
|
||||
* @return boolean true if authentication required
|
||||
*/
|
||||
protected function _authRequired($controller) {
|
||||
if (is_array($this->requireAuth) && !empty($this->requireAuth) && !empty($this->request->data)) {
|
||||
|
@ -392,8 +392,8 @@ class SecurityComponent extends Component {
|
|||
/**
|
||||
* Validate submitted form
|
||||
*
|
||||
* @param object $controller Instantiating controller
|
||||
* @return bool true if submitted form is valid
|
||||
* @param Controller $controller Instantiating controller
|
||||
* @return boolean true if submitted form is valid
|
||||
*/
|
||||
protected function _validatePost($controller) {
|
||||
if (empty($controller->request->data)) {
|
||||
|
@ -472,8 +472,8 @@ class SecurityComponent extends Component {
|
|||
/**
|
||||
* Add authentication key for new form posts
|
||||
*
|
||||
* @param object $controller Instantiating controller
|
||||
* @return bool Success
|
||||
* @param Controller $controller Instantiating controller
|
||||
* @return boolean Success
|
||||
*/
|
||||
protected function _generateToken($controller) {
|
||||
if (isset($controller->request->params['requested']) && $controller->request->params['requested'] === 1) {
|
||||
|
@ -539,7 +539,7 @@ class SecurityComponent extends Component {
|
|||
* Uses a simple timeout to expire the tokens.
|
||||
*
|
||||
* @param array $tokens An array of nonce => expires.
|
||||
* @return An array of nonce => expires.
|
||||
* @return array An array of nonce => expires.
|
||||
*/
|
||||
protected function _expireTokens($tokens) {
|
||||
$now = time();
|
||||
|
@ -554,7 +554,7 @@ class SecurityComponent extends Component {
|
|||
/**
|
||||
* Calls a controller callback method
|
||||
*
|
||||
* @param object $controller Controller to run callback on
|
||||
* @param Controller $controller Controller to run callback on
|
||||
* @param string $method Method to execute
|
||||
* @param array $params Parameters to send to method
|
||||
* @return mixed Controller callback method's response
|
||||
|
|
|
@ -193,7 +193,7 @@ class App {
|
|||
/**
|
||||
* Indicates whether the object cache should be stored again because of an addition to it
|
||||
*
|
||||
* @var boolean
|
||||
* @var boolean
|
||||
*/
|
||||
private static $_objectCacheChange = false;
|
||||
|
||||
|
@ -725,7 +725,7 @@ class App {
|
|||
* @param array $search list of paths to search the file into
|
||||
* @param string $file filename if known, the $name param will be used otherwise
|
||||
* @param boolean $return whether this function should return the contents of the file after being parsed by php or just a success notice
|
||||
* @return mixed, if $return contents of the file after php parses it, boolean indicating success otherwise
|
||||
* @return mixed if $return contents of the file after php parses it, boolean indicating success otherwise
|
||||
*/
|
||||
private function _loadFile($name, $plugin, $search, $file, $return) {
|
||||
$mapped = self::__mapped($name, $plugin);
|
||||
|
@ -827,7 +827,7 @@ class App {
|
|||
*
|
||||
* @param string $name unique name
|
||||
* @param string $plugin camelized if object is from a plugin, the name of the plugin
|
||||
* @return mixed, file path if found, false otherwise
|
||||
* @return mixed file path if found, false otherwise
|
||||
*/
|
||||
private static function __mapped($name, $plugin = null) {
|
||||
if ($plugin) {
|
||||
|
|
|
@ -35,10 +35,8 @@ class Object {
|
|||
/**
|
||||
* constructor, no-op
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function __construct() {
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -173,7 +171,7 @@ class Object {
|
|||
* this method as an empty function.
|
||||
*
|
||||
* @param array $properties The name of the properties to merge.
|
||||
* @param sting $class The class to merge the property with.
|
||||
* @param string $class The class to merge the property with.
|
||||
* @param boolean $normalize Set to true to run the properties through Set::normalize() before merging.
|
||||
* @return void
|
||||
*/
|
||||
|
|
|
@ -186,7 +186,7 @@ class ErrorHandler {
|
|||
/**
|
||||
* Map an error code into an Error word, and log location.
|
||||
*
|
||||
* @param int $code Error code to map
|
||||
* @param integer $code Error code to map
|
||||
* @return array Array of error word, and log location.
|
||||
*/
|
||||
protected static function _mapErrorCode($code) {
|
||||
|
|
|
@ -94,7 +94,7 @@ class I18n {
|
|||
/**
|
||||
* Return a static instance of the I18n class
|
||||
*
|
||||
* @return object I18n
|
||||
* @return I18n
|
||||
*/
|
||||
public static function &getInstance() {
|
||||
static $instance = array();
|
||||
|
@ -215,7 +215,7 @@ class I18n {
|
|||
* Attempts to find the plural form of a string.
|
||||
*
|
||||
* @param string $header Type
|
||||
* @param integrer $n Number
|
||||
* @param integer $n Number
|
||||
* @return integer plural match
|
||||
*/
|
||||
private function __pluralGuess($header, $n) {
|
||||
|
|
|
@ -365,7 +365,7 @@ class Multibyte {
|
|||
* If set to true, it returns all of $haystack from the beginning to the first occurrence of $needle.
|
||||
* If set to false, it returns all of $haystack from the first occurrence of $needle to the end,
|
||||
* Default value is false.
|
||||
* @return int|boolean The portion of $haystack, or false if $needle is not found.
|
||||
* @return integer|boolean The portion of $haystack, or false if $needle is not found.
|
||||
*/
|
||||
public static function stristr($haystack, $needle, $part = false) {
|
||||
$php = (PHP_VERSION < 5.3);
|
||||
|
@ -1003,7 +1003,7 @@ class Multibyte {
|
|||
/**
|
||||
* Return the Code points range for Unicode characters
|
||||
*
|
||||
* @param interger $decimal
|
||||
* @param integer $decimal
|
||||
* @return string
|
||||
*/
|
||||
private static function __codepoint($decimal) {
|
||||
|
|
|
@ -43,7 +43,6 @@ class FileLog implements CakeLogInterface {
|
|||
* - `path` the path to save logs on.
|
||||
*
|
||||
* @param array $options Options for the FileLog, see above.
|
||||
* @return void
|
||||
*/
|
||||
function __construct($options = array()) {
|
||||
$options += array('path' => LOGS);
|
||||
|
|
|
@ -87,7 +87,7 @@ class ContainableBehavior extends ModelBehavior {
|
|||
* )));
|
||||
* }}}
|
||||
*
|
||||
* @param object $Model Model using the behavior
|
||||
* @param Model $Model Model using the behavior
|
||||
* @param array $query Query parameters as set by cake
|
||||
* @return array
|
||||
*/
|
||||
|
@ -227,7 +227,7 @@ class ContainableBehavior extends ModelBehavior {
|
|||
*
|
||||
* @param Model $Model Model on which we are resetting
|
||||
* @param array $results Results of the find operation
|
||||
* @param bool $primary true if this is the primary model that issued the find operation, false otherwise
|
||||
* @param boolean $primary true if this is the primary model that issued the find operation, false otherwise
|
||||
* @return void
|
||||
*/
|
||||
public function afterFind($Model, $results, $primary) {
|
||||
|
@ -243,7 +243,7 @@ class ContainableBehavior extends ModelBehavior {
|
|||
* Unbinds all relations from a model except the specified ones. Calling this function without
|
||||
* parameters unbinds all related models.
|
||||
*
|
||||
* @param object $Model Model on which binding restriction is being applied
|
||||
* @param Model $Model Model on which binding restriction is being applied
|
||||
* @return void
|
||||
* @link http://book.cakephp.org/view/1323/Containable#Using-Containable-1324
|
||||
*/
|
||||
|
@ -258,7 +258,7 @@ class ContainableBehavior extends ModelBehavior {
|
|||
* for restoring the bindings after using 'reset' => false as part of the
|
||||
* contain call.
|
||||
*
|
||||
* @param object $Model Model on which to reset bindings
|
||||
* @param Model $Model Model on which to reset bindings
|
||||
* @return void
|
||||
*/
|
||||
public function resetBindings($Model) {
|
||||
|
@ -279,10 +279,10 @@ class ContainableBehavior extends ModelBehavior {
|
|||
/**
|
||||
* Process containments for model.
|
||||
*
|
||||
* @param object $Model Model on which binding restriction is being applied
|
||||
* @param Model $Model Model on which binding restriction is being applied
|
||||
* @param array $contain Parameters to use for restricting this model
|
||||
* @param array $containments Current set of containments
|
||||
* @param bool $throwErrors Wether unexisting bindings show throw errors
|
||||
* @param boolean $throwErrors Wether unexisting bindings show throw errors
|
||||
* @return array Containments
|
||||
*/
|
||||
public function containments($Model, $contain, $containments = array(), $throwErrors = null) {
|
||||
|
@ -383,7 +383,7 @@ class ContainableBehavior extends ModelBehavior {
|
|||
/**
|
||||
* Calculate needed fields to fetch the required bindings for the given model.
|
||||
*
|
||||
* @param object $Model Model
|
||||
* @param Model $Model Model
|
||||
* @param array $map Map of relations for given model
|
||||
* @param mixed $fields If array, fields to initially load, if false use $Model as primary model
|
||||
* @return array Fields
|
||||
|
|
|
@ -352,7 +352,7 @@ class TranslateBehavior extends ModelBehavior {
|
|||
* name to find/use. If no translateModel property is found 'I18nModel' will be used.
|
||||
*
|
||||
* @param Model $model Model to get a translatemodel for.
|
||||
* @return object
|
||||
* @return Model
|
||||
*/
|
||||
public function translateModel($model) {
|
||||
if (!isset($this->runtime[$model->alias]['model'])) {
|
||||
|
@ -379,7 +379,7 @@ class TranslateBehavior extends ModelBehavior {
|
|||
* @param Model $model instance of model
|
||||
* @param string|array $fields string with field or array(field1, field2=>AssocName, field3)
|
||||
* @param boolean $reset
|
||||
* @return bool
|
||||
* @return boolean
|
||||
*/
|
||||
public function bindTranslation($model, $fields, $reset = true) {
|
||||
if (is_string($fields)) {
|
||||
|
@ -449,10 +449,10 @@ class TranslateBehavior extends ModelBehavior {
|
|||
* Unbind translation for fields, optionally unbinds hasMany association for
|
||||
* fake field
|
||||
*
|
||||
* @param object $model instance of model
|
||||
* @param Model $model instance of model
|
||||
* @param mixed $fields string with field, or array(field1, field2=>AssocName, field3), or null for
|
||||
* unbind all original translations
|
||||
* @return bool
|
||||
* @return boolean
|
||||
*/
|
||||
public function unbindTranslation($model, $fields = null) {
|
||||
if (empty($fields) && empty($this->settings[$model->alias])) {
|
||||
|
|
|
@ -50,7 +50,7 @@ class TreeBehavior extends ModelBehavior {
|
|||
/**
|
||||
* Initiate Tree behavior
|
||||
*
|
||||
* @param object $Model instance of model
|
||||
* @param Model $Model instance of model
|
||||
* @param array $config array of configuration settings.
|
||||
* @return void
|
||||
*/
|
||||
|
@ -427,7 +427,7 @@ class TreeBehavior extends ModelBehavior {
|
|||
*
|
||||
* @param Model $Model Model instance
|
||||
* @param mixed $id The ID of the record to move
|
||||
* @param int|bool $number how many places to move the node or true to move to last position
|
||||
* @param integer|boolean $number how many places to move the node or true to move to last position
|
||||
* @return boolean true on success, false on failure
|
||||
* @link http://book.cakephp.org/view/1352/moveDown
|
||||
*/
|
||||
|
@ -485,7 +485,7 @@ class TreeBehavior extends ModelBehavior {
|
|||
*
|
||||
* @param Model $Model Model instance
|
||||
* @param mixed $id The ID of the record to move
|
||||
* @param int|bool $number how many places to move the node, or true to move to first position
|
||||
* @param integer|boolean $number how many places to move the node, or true to move to first position
|
||||
* @return boolean true on success, false on failure
|
||||
* @link http://book.cakephp.org/view/1353/moveUp
|
||||
*/
|
||||
|
|
|
@ -74,7 +74,7 @@ class ConnectionManager {
|
|||
* Gets a reference to a DataSource object
|
||||
*
|
||||
* @param string $name The name of the DataSource, as defined in app/Config/database.php
|
||||
* @return object Instance
|
||||
* @return DataSource Instance
|
||||
* @throws MissingDatasourceConfigException
|
||||
* @throws MissingDatasourceFileException
|
||||
*/
|
||||
|
@ -119,7 +119,7 @@ class ConnectionManager {
|
|||
/**
|
||||
* Gets a DataSource name from an object reference.
|
||||
*
|
||||
* @param object $source DataSource object
|
||||
* @param DataSource $source DataSource object
|
||||
* @return string Datasource name, or null if source is not present
|
||||
* in the ConnectionManager.
|
||||
*/
|
||||
|
@ -192,7 +192,7 @@ class ConnectionManager {
|
|||
*
|
||||
* @param string $name The DataSource name
|
||||
* @param array $config The DataSource configuration settings
|
||||
* @return object A reference to the DataSource object, or null if creation failed
|
||||
* @return DataSource A reference to the DataSource object, or null if creation failed
|
||||
*/
|
||||
public static function create($name = '', $config = array()) {
|
||||
if (empty(self::$_init)) {
|
||||
|
|
|
@ -78,7 +78,6 @@ class DataSource extends Object {
|
|||
* Constructor.
|
||||
*
|
||||
* @param array $config Array of configuration information for the datasource.
|
||||
* @return void.
|
||||
*/
|
||||
public function __construct($config = array()) {
|
||||
parent::__construct();
|
||||
|
@ -408,7 +407,6 @@ class DataSource extends Object {
|
|||
/**
|
||||
* Closes the current datasource.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function __destruct() {
|
||||
if ($this->_transactionStarted) {
|
||||
|
|
|
@ -84,14 +84,14 @@ class DboOracle extends DboSource {
|
|||
/**
|
||||
* Query limit
|
||||
*
|
||||
* @var int
|
||||
* @var integer
|
||||
*/
|
||||
protected $_limit = -1;
|
||||
|
||||
/**
|
||||
* Query offset
|
||||
*
|
||||
* @var int
|
||||
* @var integer
|
||||
*/
|
||||
protected $_offset = 0;
|
||||
|
||||
|
@ -112,7 +112,7 @@ class DboOracle extends DboSource {
|
|||
/**
|
||||
* Number of rows
|
||||
*
|
||||
* @var int
|
||||
* @var integer
|
||||
*/
|
||||
protected $_numRows;
|
||||
|
||||
|
@ -126,7 +126,7 @@ class DboOracle extends DboSource {
|
|||
/**
|
||||
* Last error issued by oci extension
|
||||
*
|
||||
* @var unknown_type
|
||||
* @var string
|
||||
*/
|
||||
protected $_error;
|
||||
|
||||
|
@ -148,7 +148,7 @@ class DboOracle extends DboSource {
|
|||
/**
|
||||
* Table-sequence map
|
||||
*
|
||||
* @var unknown_type
|
||||
* @var array
|
||||
*/
|
||||
protected $_sequenceMap = array();
|
||||
|
||||
|
@ -209,7 +209,7 @@ class DboOracle extends DboSource {
|
|||
* Sets the encoding language of the session
|
||||
*
|
||||
* @param string $lang language constant
|
||||
* @return bool
|
||||
* @return boolean
|
||||
*/
|
||||
public function setEncoding($lang) {
|
||||
if (!$this->execute('ALTER SESSION SET NLS_LANGUAGE='.$lang)) {
|
||||
|
@ -252,7 +252,7 @@ class DboOracle extends DboSource {
|
|||
* experimental method that creates the association maps since Oracle will not tell us.
|
||||
*
|
||||
* @param string $sql
|
||||
* @return false if sql is nor a SELECT
|
||||
* @return void
|
||||
*/
|
||||
protected function _scrapeSQL($sql) {
|
||||
$sql = str_replace("\"", '', $sql);
|
||||
|
@ -301,7 +301,7 @@ class DboOracle extends DboSource {
|
|||
*
|
||||
* @param integer $limit Maximum number of rows to return
|
||||
* @param integer $offset Row to begin returning
|
||||
* @return modified SQL Query
|
||||
* @return void
|
||||
*/
|
||||
public function limit($limit = -1, $offset = 0) {
|
||||
$this->_limit = (int) $limit;
|
||||
|
@ -401,7 +401,7 @@ class DboOracle extends DboSource {
|
|||
/**
|
||||
* Fetches the next row from the current result set
|
||||
*
|
||||
* @return unknown
|
||||
* @return array
|
||||
*/
|
||||
public function fetchResult() {
|
||||
return $this->fetchRow();
|
||||
|
@ -411,7 +411,7 @@ class DboOracle extends DboSource {
|
|||
* Checks to see if a named sequence exists
|
||||
*
|
||||
* @param string $sequence
|
||||
* @return bool
|
||||
* @return boolean|array
|
||||
*/
|
||||
public function sequenceExists($sequence) {
|
||||
$sql = "SELECT SEQUENCE_NAME FROM USER_SEQUENCES WHERE SEQUENCE_NAME = '$sequence'";
|
||||
|
@ -425,7 +425,7 @@ class DboOracle extends DboSource {
|
|||
* Creates a database sequence
|
||||
*
|
||||
* @param string $sequence
|
||||
* @return bool
|
||||
* @return boolean
|
||||
*/
|
||||
public function createSequence($sequence) {
|
||||
$sql = "CREATE SEQUENCE $sequence";
|
||||
|
@ -905,7 +905,7 @@ class DboOracle extends DboSource {
|
|||
* Returns number of affected rows in previous database operation. If no previous operation exists, this returns false.
|
||||
*
|
||||
* @param mixed $source
|
||||
* @return int Number of affected rows
|
||||
* @return integer Number of affected rows
|
||||
*/
|
||||
public function lastAffected($source = null) {
|
||||
return $this->_statementId ? ocirowcount($this->_statementId): false;
|
||||
|
|
|
@ -659,7 +659,7 @@ class Postgres extends DboSource {
|
|||
* Gets the length of a database-native column description, or null if no length
|
||||
*
|
||||
* @param string $real Real database-layer column type (i.e. "varchar(255)")
|
||||
* @return int An integer representing the length of the column
|
||||
* @return integer An integer representing the length of the column
|
||||
*/
|
||||
public function length($real) {
|
||||
$col = str_replace(array(')', 'unsigned'), '', $real);
|
||||
|
@ -704,7 +704,7 @@ class Postgres extends DboSource {
|
|||
/**
|
||||
* Fetches the next row from the current result set
|
||||
*
|
||||
* @return unknown
|
||||
* @return array
|
||||
*/
|
||||
public function fetchResult() {
|
||||
if ($row = $this->_result->fetch()) {
|
||||
|
|
|
@ -79,7 +79,7 @@ class DboSource extends DataSource {
|
|||
/**
|
||||
* Error description of last query
|
||||
*
|
||||
* @var unknown_type
|
||||
* @var string
|
||||
*/
|
||||
public $error = null;
|
||||
|
||||
|
@ -93,14 +93,14 @@ class DboSource extends DataSource {
|
|||
/**
|
||||
* Number of rows in current resultset
|
||||
*
|
||||
* @var int
|
||||
* @var integer
|
||||
*/
|
||||
public $numRows = null;
|
||||
|
||||
/**
|
||||
* Time the last query took
|
||||
*
|
||||
* @var int
|
||||
* @var integer
|
||||
*/
|
||||
public $took = null;
|
||||
|
||||
|
@ -114,21 +114,21 @@ class DboSource extends DataSource {
|
|||
/**
|
||||
* Queries count.
|
||||
*
|
||||
* @var int
|
||||
* @var integer
|
||||
*/
|
||||
protected $_queriesCnt = 0;
|
||||
|
||||
/**
|
||||
* Total duration of all queries.
|
||||
*
|
||||
* @var unknown_type
|
||||
* @var integer
|
||||
*/
|
||||
protected $_queriesTime = null;
|
||||
|
||||
/**
|
||||
* Log of queries executed by this DataSource
|
||||
*
|
||||
* @var unknown_type
|
||||
* @var array
|
||||
*/
|
||||
protected $_queriesLog = array();
|
||||
|
||||
|
@ -137,7 +137,7 @@ class DboSource extends DataSource {
|
|||
*
|
||||
* This is to prevent query log taking over too much memory.
|
||||
*
|
||||
* @var int Maximum number of queries in the queries log.
|
||||
* @var integer Maximum number of queries in the queries log.
|
||||
*/
|
||||
protected $_queriesLogMax = 200;
|
||||
|
||||
|
@ -352,7 +352,7 @@ class DboSource extends DataSource {
|
|||
* are not sanitized or esacped.
|
||||
*
|
||||
* @param string $identifier A SQL expression to be used as an identifier
|
||||
* @return object An object representing a database identifier to be used in a query
|
||||
* @return stdClass An object representing a database identifier to be used in a query
|
||||
*/
|
||||
public function identifier($identifier) {
|
||||
$obj = new stdClass();
|
||||
|
@ -366,7 +366,7 @@ class DboSource extends DataSource {
|
|||
* are not sanitized or esacped.
|
||||
*
|
||||
* @param string $expression An arbitrary SQL expression to be inserted into a query.
|
||||
* @return object An object representing a database expression to be used in a query
|
||||
* @return stdClass An object representing a database expression to be used in a query
|
||||
*/
|
||||
public function expression($expression) {
|
||||
$obj = new stdClass();
|
||||
|
@ -1298,7 +1298,7 @@ class DboSource extends DataSource {
|
|||
/**
|
||||
* A more efficient way to fetch associations. Woohoo!
|
||||
*
|
||||
* @param model $model Primary model object
|
||||
* @param Model $model Primary model object
|
||||
* @param string $query Association query
|
||||
* @param array $ids Array of IDs of associated records
|
||||
* @return array Association results
|
||||
|
@ -1318,8 +1318,8 @@ class DboSource extends DataSource {
|
|||
* @param array $resultSet Data to merge into
|
||||
* @param array $merge Data to merge
|
||||
* @param string $association Name of Model being Merged
|
||||
* @param object $model Model being merged onto
|
||||
* @param object $linkModel Model being merged
|
||||
* @param Model $model Model being merged onto
|
||||
* @param Model $linkModel Model being merged
|
||||
* @return void
|
||||
*/
|
||||
private function __mergeHasMany(&$resultSet, $merge, $association, $model, $linkModel) {
|
||||
|
@ -1666,7 +1666,7 @@ class DboSource extends DataSource {
|
|||
* Builds and generates an SQL statement from an array. Handles final clean-up before conversion.
|
||||
*
|
||||
* @param array $query An array defining an SQL query
|
||||
* @param object $model The model object which initiated the query
|
||||
* @param Model $model The model object which initiated the query
|
||||
* @return string An executable SQL statement
|
||||
* @see DboSource::renderStatement()
|
||||
*/
|
||||
|
@ -1930,7 +1930,7 @@ class DboSource extends DataSource {
|
|||
/**
|
||||
* Returns an array of SQL JOIN fragments from a model's associations
|
||||
*
|
||||
* @param object $model
|
||||
* @param Model $model
|
||||
* @return array
|
||||
*/
|
||||
protected function _getJoins($model) {
|
||||
|
@ -1957,7 +1957,7 @@ class DboSource extends DataSource {
|
|||
/**
|
||||
* Returns an SQL calculation, i.e. COUNT() or MAX()
|
||||
*
|
||||
* @param model $model
|
||||
* @param Model $model
|
||||
* @param string $func Lowercase name of SQL function, i.e. 'count' or 'max'
|
||||
* @param array $params Function parameters (any values must be quoted manually)
|
||||
* @return string An SQL calculation function
|
||||
|
@ -2072,7 +2072,7 @@ class DboSource extends DataSource {
|
|||
* If conditions are supplied then they will be returned. If a model doesn't exist and no conditions
|
||||
* were provided either null or false will be returned based on what was input.
|
||||
*
|
||||
* @param object $model
|
||||
* @param Model $model
|
||||
* @param mixed $conditions Array of conditions, conditions string, null or false. If an array of conditions,
|
||||
* or string conditions those conditions will be returned. With other values the model's existance will be checked.
|
||||
* If the model doesn't exist a null or false will be returned depending on the input value.
|
||||
|
@ -2636,7 +2636,7 @@ class DboSource extends DataSource {
|
|||
*
|
||||
* @param string $group Group By Condition
|
||||
* @param Model $model
|
||||
* @return null|string string condition or null
|
||||
* @return string string condition or null
|
||||
*/
|
||||
public function group($group, $model = null) {
|
||||
if ($group) {
|
||||
|
@ -2796,7 +2796,7 @@ class DboSource extends DataSource {
|
|||
/**
|
||||
* Generate a database-native schema for the given Schema object
|
||||
*
|
||||
* @param object $schema An instance of a subclass of CakeSchema
|
||||
* @param Model $schema An instance of a subclass of CakeSchema
|
||||
* @param string $tableName Optional. If specified only the table name given will be generated.
|
||||
* Otherwise, all tables defined in the schema are generated.
|
||||
* @return string
|
||||
|
@ -3119,7 +3119,6 @@ class DboSource extends DataSource {
|
|||
/**
|
||||
* Used for storing in cache the results of the in-memory methodCache
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function __destruct() {
|
||||
if ($this->_methodCacheChange) {
|
||||
|
|
|
@ -27,7 +27,6 @@ class DatabaseSession implements CakeSessionHandlerInterface {
|
|||
* Constructor. Looks at Session configuration information and
|
||||
* sets up the session model.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function __construct() {
|
||||
$modelName = Configure::read('Session.handler.model');
|
||||
|
|
|
@ -2266,7 +2266,7 @@ class Model extends Object {
|
|||
* @param string $state Either "before" or "after"
|
||||
* @param array $query
|
||||
* @param array $results
|
||||
* @return int The number of records found, or false
|
||||
* @return integer The number of records found, or false
|
||||
* @see Model::find()
|
||||
*/
|
||||
protected function _findCount($state, $query, $results = array()) {
|
||||
|
@ -2883,7 +2883,7 @@ class Model extends Object {
|
|||
/**
|
||||
* Returns the number of rows returned from the last query.
|
||||
*
|
||||
* @return int Number of rows
|
||||
* @return integer Number of rows
|
||||
*/
|
||||
public function getNumRows() {
|
||||
return $this->getDataSource()->lastNumRows();
|
||||
|
@ -2892,7 +2892,7 @@ class Model extends Object {
|
|||
/**
|
||||
* Returns the number of rows affected by the last query.
|
||||
*
|
||||
* @return int Number of rows
|
||||
* @return integer Number of rows
|
||||
*/
|
||||
public function getAffectedRows() {
|
||||
return $this->getDataSource()->lastAffected();
|
||||
|
@ -2930,7 +2930,7 @@ class Model extends Object {
|
|||
/**
|
||||
* Gets the DataSource to which this model is bound.
|
||||
*
|
||||
* @return object A DataSource object
|
||||
* @return DataSource A DataSource object
|
||||
*/
|
||||
public function getDataSource() {
|
||||
if (!$this->__sourceConfigured && $this->useTable !== false) {
|
||||
|
|
|
@ -120,7 +120,6 @@ class CakeRequest implements ArrayAccess {
|
|||
*
|
||||
* @param string $url Trimmed url string to use. Should not contain the application base path.
|
||||
* @param boolean $parseEnvironment Set to false to not auto parse the environment. ie. GET, POST and FILES.
|
||||
* @return void
|
||||
*/
|
||||
public function __construct($url = null, $parseEnvironment = true) {
|
||||
$this->_base();
|
||||
|
@ -500,7 +499,7 @@ class CakeRequest implements ArrayAccess {
|
|||
* Provides an easy way to modify, here, webroot and base.
|
||||
*
|
||||
* @param array $paths Array of paths to merge in
|
||||
* @return the current object, you can chain this method.
|
||||
* @return CakeRequest the current object, you can chain this method.
|
||||
*/
|
||||
public function addPaths($paths) {
|
||||
foreach (array('webroot', 'here', 'base') as $element) {
|
||||
|
@ -571,7 +570,7 @@ class CakeRequest implements ArrayAccess {
|
|||
/**
|
||||
* Get the domain name and include $tldLength segments of the tld.
|
||||
*
|
||||
* @param int $tldLength Number of segments your tld contains. For example: `example.com` contains 1 tld.
|
||||
* @param integer $tldLength Number of segments your tld contains. For example: `example.com` contains 1 tld.
|
||||
* While `example.co.uk` contains 2.
|
||||
* @return string Domain name without subdomains.
|
||||
*/
|
||||
|
@ -584,7 +583,7 @@ class CakeRequest implements ArrayAccess {
|
|||
/**
|
||||
* Get the subdomains for a host.
|
||||
*
|
||||
* @param int $tldLength Number of segments your tld contains. For example: `example.com` contains 1 tld.
|
||||
* @param integer $tldLength Number of segments your tld contains. For example: `example.com` contains 1 tld.
|
||||
* While `example.co.uk` contains 2.
|
||||
* @return array of subdomains.
|
||||
*/
|
||||
|
|
|
@ -317,7 +317,6 @@ class CakeResponse {
|
|||
* - status: the HTTP status code to respond with
|
||||
* - type: a complete mime-type string or an extension mapepd in this class
|
||||
* - charset: the charset for the response body
|
||||
* @return void
|
||||
*/
|
||||
public function __construct(array $options = array()) {
|
||||
if (isset($options['body'])) {
|
||||
|
|
|
@ -43,7 +43,7 @@ abstract class AbstractTransport {
|
|||
* Set the config
|
||||
*
|
||||
* @param array $config
|
||||
* @return object $this
|
||||
* @return void
|
||||
*/
|
||||
public function config($config = array()) {
|
||||
if (!empty($config)) {
|
||||
|
|
|
@ -234,7 +234,7 @@ class CakeEmail {
|
|||
/**
|
||||
* Instance of transport class
|
||||
*
|
||||
* @var object
|
||||
* @var AbstractTransport
|
||||
*/
|
||||
protected $_transportClass = null;
|
||||
|
||||
|
@ -373,7 +373,7 @@ class CakeEmail {
|
|||
*
|
||||
* @param mixed $email String with email, Array with email as key, name as value or email as value (without name)
|
||||
* @param string $name
|
||||
* @return object $this
|
||||
* @return CakeEmail $this
|
||||
*/
|
||||
public function addTo($email, $name = null) {
|
||||
return $this->_addEmail('_to', $email, $name);
|
||||
|
@ -398,7 +398,7 @@ class CakeEmail {
|
|||
*
|
||||
* @param mixed $email String with email, Array with email as key, name as value or email as value (without name)
|
||||
* @param string $name
|
||||
* @return object $this
|
||||
* @return CakeEmail $this
|
||||
*/
|
||||
public function addCc($email, $name = null) {
|
||||
return $this->_addEmail('_cc', $email, $name);
|
||||
|
@ -423,7 +423,7 @@ class CakeEmail {
|
|||
*
|
||||
* @param mixed $email String with email, Array with email as key, name as value or email as value (without name)
|
||||
* @param string $name
|
||||
* @return object $this
|
||||
* @return CakeEmail $this
|
||||
*/
|
||||
public function addBcc($email, $name = null) {
|
||||
return $this->_addEmail('_bcc', $email, $name);
|
||||
|
@ -435,7 +435,7 @@ class CakeEmail {
|
|||
* @param string $varName
|
||||
* @param mixed $email
|
||||
* @param mixed $name
|
||||
* @return object $this
|
||||
* @return CakeEmail $this
|
||||
* @throws SocketException
|
||||
*/
|
||||
protected function _setEmail($varName, $email, $name) {
|
||||
|
@ -470,7 +470,7 @@ class CakeEmail {
|
|||
* @param mixed $email
|
||||
* @param string $name
|
||||
* @param string $throwMessage
|
||||
* @return object $this
|
||||
* @return CakeEmail $this
|
||||
* @throws SocketException
|
||||
*/
|
||||
protected function _setEmailSingle($varName, $email, $name, $throwMessage) {
|
||||
|
@ -489,7 +489,7 @@ class CakeEmail {
|
|||
* @param string $varName
|
||||
* @param mixed $email
|
||||
* @param mixed $name
|
||||
* @return object $this
|
||||
* @return CakeEmail $this
|
||||
* @throws SocketException
|
||||
*/
|
||||
protected function _addEmail($varName, $email, $name) {
|
||||
|
@ -535,7 +535,7 @@ class CakeEmail {
|
|||
* Sets headers for the message
|
||||
*
|
||||
* @param array $headers Associative array containing headers to be set.
|
||||
* @return object $this
|
||||
* @return CakeEmail $this
|
||||
* @throws SocketException
|
||||
*/
|
||||
public function setHeaders($headers) {
|
||||
|
@ -774,7 +774,7 @@ class CakeEmail {
|
|||
/**
|
||||
* Return the transport class
|
||||
*
|
||||
* @return object
|
||||
* @return CakeEmail
|
||||
* @throws SocketException
|
||||
*/
|
||||
public function transportClass() {
|
||||
|
@ -854,7 +854,7 @@ class CakeEmail {
|
|||
* Add attachments
|
||||
*
|
||||
* @param mixed $attachments String with the filename or array with filenames
|
||||
* @return object $this
|
||||
* @return CakeEmail $this
|
||||
* @throws SocketException
|
||||
*/
|
||||
public function addAttachments($attachments) {
|
||||
|
@ -987,7 +987,7 @@ class CakeEmail {
|
|||
* @param mixed $message String with message or array with variables to be used in render
|
||||
* @param mixed $transportConfig String to use config from EmailConfig or array with configs
|
||||
* @param boolean $send Send the email or just return the instance pre-configured
|
||||
* @return object Instance of CakeEmail
|
||||
* @return CakeEmail Instance of CakeEmail
|
||||
* @throws SocketException
|
||||
*/
|
||||
public static function deliver($to = null, $subject = null, $message = null, $transportConfig = 'fast', $send = true) {
|
||||
|
@ -1064,7 +1064,7 @@ class CakeEmail {
|
|||
/**
|
||||
* Reset all EmailComponent internal variables to be able to send out a new email.
|
||||
*
|
||||
* @return object $this
|
||||
* @return CakeEmail $this
|
||||
*/
|
||||
public function reset() {
|
||||
$this->_to = array();
|
||||
|
|
|
@ -62,7 +62,7 @@ class SmtpTransport extends AbstractTransport {
|
|||
* Set the configuration
|
||||
*
|
||||
* @param array $config
|
||||
* @return object $this
|
||||
* @return void
|
||||
*/
|
||||
public function config($config = array()) {
|
||||
$default = array(
|
||||
|
|
|
@ -83,7 +83,6 @@ class CakeRoute {
|
|||
* @param string $template Template string with parameter placeholders
|
||||
* @param array $defaults Array of defaults for the route.
|
||||
* @param array $options Array of additional options for the Route
|
||||
* @return void
|
||||
*/
|
||||
public function __construct($template, $defaults = array(), $options = array()) {
|
||||
$this->template = $template;
|
||||
|
|
|
@ -868,10 +868,10 @@ class Router {
|
|||
/**
|
||||
* Generates a well-formed querystring from $q
|
||||
*
|
||||
* @param mixed $q Query string Either a string of already compiled query string arguments or
|
||||
* @param string|array $q Query string Either a string of already compiled query string arguments or
|
||||
* an array of arguments to convert into a query string.
|
||||
* @param array $extra Extra querystring parameters.
|
||||
* @param bool $escape Whether or not to use escaped &
|
||||
* @param boolean $escape Whether or not to use escaped &
|
||||
* @return array
|
||||
*/
|
||||
public static function queryString($q, $extra = array(), $escape = false) {
|
||||
|
@ -987,7 +987,7 @@ class Router {
|
|||
*
|
||||
* @param string $base Base URL
|
||||
* @param string $plugin Plugin name
|
||||
* @return base url with plugin name removed if present
|
||||
* @return string base url with plugin name removed if present
|
||||
*/
|
||||
public static function stripPlugin($base, $plugin = null) {
|
||||
if ($plugin != null) {
|
||||
|
|
|
@ -325,7 +325,7 @@ class File {
|
|||
* makes filename safe for saving
|
||||
*
|
||||
* @param string $name The name of the file to make safe if different from $this->name
|
||||
* @param strin $ext The name of the extension to make safe if different from $this->ext
|
||||
* @param string $ext The name of the extension to make safe if different from $this->ext
|
||||
* @return string $ext the extension of the file
|
||||
*/
|
||||
public function safe($name = null, $ext = null) {
|
||||
|
|
|
@ -239,7 +239,7 @@ class Folder {
|
|||
* Returns true if given $path is an absolute path.
|
||||
*
|
||||
* @param string $path Path to check
|
||||
* @return bool true if path is absolute.
|
||||
* @return boolean true if path is absolute.
|
||||
*/
|
||||
public static function isAbsolute($path) {
|
||||
return !empty($path) && ($path[0] === '/' || preg_match('/^[A-Z]:\\\\/i', $path) || substr($path, 0, 2) == '\\\\');
|
||||
|
@ -293,7 +293,7 @@ class Folder {
|
|||
* Returns true if the File is in a given CakePath.
|
||||
*
|
||||
* @param string $path The path to check.
|
||||
* @return bool
|
||||
* @return boolean
|
||||
*/
|
||||
public function inCakePath($path = '') {
|
||||
$dir = substr(Folder::slashTerm(ROOT), 0, -1);
|
||||
|
@ -307,7 +307,7 @@ class Folder {
|
|||
*
|
||||
* @param string $path The path to check that the current pwd() resides with in.
|
||||
* @param boolean $reverse
|
||||
* @return bool
|
||||
* @return boolean
|
||||
*/
|
||||
public function inPath($path = '', $reverse = false) {
|
||||
$dir = Folder::slashTerm($path);
|
||||
|
@ -471,7 +471,7 @@ class Folder {
|
|||
/**
|
||||
* Returns the size in bytes of this Folder and its contents.
|
||||
*
|
||||
* @return int size in bytes of current folder
|
||||
* @return integer size in bytes of current folder
|
||||
*/
|
||||
public function dirsize() {
|
||||
$size = 0;
|
||||
|
@ -563,7 +563,7 @@ class Folder {
|
|||
* - `skip` Files/directories to skip.
|
||||
*
|
||||
* @param mixed $options Either an array of options (see above) or a string of the destination directory.
|
||||
* @return bool Success
|
||||
* @return boolean Success
|
||||
*/
|
||||
public function copy($options = array()) {
|
||||
if (!$this->pwd()) {
|
||||
|
|
|
@ -142,7 +142,7 @@ abstract class ObjectCollection {
|
|||
/**
|
||||
* Provide isset access to _loaded
|
||||
*
|
||||
* @param sting $name Name of object being checked.
|
||||
* @param string $name Name of object being checked.
|
||||
* @return boolean
|
||||
*/
|
||||
public function __isset($name) {
|
||||
|
|
|
@ -71,7 +71,7 @@ class Xml {
|
|||
*
|
||||
* @param mixed $input XML string, a path to a file, an URL or an array
|
||||
* @param array $options The options to use
|
||||
* @return object SimpleXMLElement or DOMDocument
|
||||
* @return SimpleXMLElement|DOMDocument SimpleXMLElement or DOMDocument
|
||||
* @throws XmlException
|
||||
*/
|
||||
public static function build($input, $options = array()) {
|
||||
|
@ -139,7 +139,7 @@ class Xml {
|
|||
*
|
||||
* @param array $input Array with data
|
||||
* @param array $options The options to use
|
||||
* @return object SimpleXMLElement or DOMDocument
|
||||
* @return SimpleXMLElement|DOMDocument SimpleXMLElement or DOMDocument
|
||||
* @throws XmlException
|
||||
*/
|
||||
public static function fromArray($input, $options = array()) {
|
||||
|
@ -175,8 +175,8 @@ class Xml {
|
|||
/**
|
||||
* Recursive method to create childs from array
|
||||
*
|
||||
* @param object $dom Handler to DOMDocument
|
||||
* @param object $node Handler to DOMElement (child)
|
||||
* @param DOMDocument $dom Handler to DOMDocument
|
||||
* @param DOMElement $node Handler to DOMElement (child)
|
||||
* @param array $data Array of data to append to the $node.
|
||||
* @param string $format Either 'attribute' or 'tags'. This determines where nested keys go.
|
||||
* @return void
|
||||
|
@ -268,7 +268,7 @@ class Xml {
|
|||
/**
|
||||
* Returns this XML structure as a array.
|
||||
*
|
||||
* @param object $obj SimpleXMLElement, DOMDocument or DOMNode instance
|
||||
* @param SimpleXMLElement|DOMDocument|DOMNode $obj SimpleXMLElement, DOMDocument or DOMNode instance
|
||||
* @return array Array representation of the XML structure.
|
||||
* @throws XmlException
|
||||
*/
|
||||
|
@ -288,7 +288,7 @@ class Xml {
|
|||
/**
|
||||
* Recursive method to toArray
|
||||
*
|
||||
* @param object $xml SimpleXMLElement object
|
||||
* @param SimpleXMLElement $xml SimpleXMLElement object
|
||||
* @param array $parentData Parent array with data
|
||||
* @param string $ns Namespace of current child
|
||||
* @param array $namespaces List of namespaces in XML
|
||||
|
|
|
@ -292,7 +292,7 @@ class Helper extends Object {
|
|||
* content is the best way to prevent all possible attacks.
|
||||
*
|
||||
* @param mixed $output Either an array of strings to clean or a single string to clean.
|
||||
* @return cleaned content for output
|
||||
* @return string|array cleaned content for output
|
||||
*/
|
||||
public function clean($output) {
|
||||
$this->__reset();
|
||||
|
|
|
@ -207,7 +207,7 @@ class CacheHelper extends AppHelper {
|
|||
* Write a cached version of the file
|
||||
*
|
||||
* @param string $content view content to write to a cache file.
|
||||
* @param sting $timestamp Duration to set for cache file.
|
||||
* @param string $timestamp Duration to set for cache file.
|
||||
* @param boolean $useCallbacks
|
||||
* @return boolean success of caching view.
|
||||
*/
|
||||
|
|
|
@ -1099,7 +1099,7 @@ class FormHelper extends AppHelper {
|
|||
* @param string $name The name of the option to pull out.
|
||||
* @param array $options The array of options you want to extract.
|
||||
* @param mixed $default The default option value
|
||||
* @return the contents of the option or default
|
||||
* @return mixed the contents of the option or default
|
||||
*/
|
||||
protected function _extractOption($name, $options, $default = null) {
|
||||
if (array_key_exists($name, $options)) {
|
||||
|
|
|
@ -705,8 +705,8 @@ class HtmlHelper extends AppHelper {
|
|||
* @param array $data Array of table data
|
||||
* @param array $oddTrOptions HTML options for odd TR elements if true useCount is used
|
||||
* @param array $evenTrOptions HTML options for even TR elements
|
||||
* @param bool $useCount adds class "column-$i"
|
||||
* @param bool $continueOddEven If false, will use a non-static $count variable,
|
||||
* @param boolean $useCount adds class "column-$i"
|
||||
* @param boolean $continueOddEven If false, will use a non-static $count variable,
|
||||
* so that the odd/even count is reset to zero just for that call.
|
||||
* @return string Formatted HTML
|
||||
* @link http://book.cakephp.org/view/1447/tableCells
|
||||
|
|
|
@ -134,7 +134,7 @@ class JqueryEngineHelper extends JsBaseEngineHelper {
|
|||
* Create javascript selector for a CSS rule
|
||||
*
|
||||
* @param string $selector The selector that is targeted
|
||||
* @return object instance of $this. Allows chained methods.
|
||||
* @return JqueryEngineHelper instance of $this. Allows chained methods.
|
||||
*/
|
||||
public function get($selector) {
|
||||
if ($selector == 'window' || $selector == 'document') {
|
||||
|
|
|
@ -296,7 +296,7 @@ abstract class JsBaseEngineHelper extends AppHelper {
|
|||
* Create javascript selector for a CSS rule
|
||||
*
|
||||
* @param string $selector The selector that is targeted
|
||||
* @return object instance of $this. Allows chained methods.
|
||||
* @return JsBaseEngineHelper instance of $this. Allows chained methods.
|
||||
*/
|
||||
abstract public function get($selector);
|
||||
|
||||
|
|
|
@ -115,7 +115,7 @@ class MootoolsEngineHelper extends JsBaseEngineHelper {
|
|||
* Create javascript selector for a CSS rule
|
||||
*
|
||||
* @param string $selector The selector that is targeted
|
||||
* @return object instance of $this. Allows chained methods.
|
||||
* @return MootoolsEngineHelper instance of $this. Allows chained methods.
|
||||
*/
|
||||
public function get($selector) {
|
||||
$this->_multipleSelection = false;
|
||||
|
|
|
@ -405,7 +405,7 @@ class PaginatorHelper extends AppHelper {
|
|||
*
|
||||
* @param array $url Array of url params to convert
|
||||
* @param string $type
|
||||
* @return converted url params.
|
||||
* @return array converted url params.
|
||||
*/
|
||||
protected function _convertUrlKeys($url, $type) {
|
||||
if ($type == 'named') {
|
||||
|
@ -492,7 +492,7 @@ class PaginatorHelper extends AppHelper {
|
|||
* Returns true if the given result set has the page number given by $page
|
||||
*
|
||||
* @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.
|
||||
* @param integer $page The page number - if not set defaults to 1.
|
||||
* @return boolean True if the given result set has the specified page number.
|
||||
*/
|
||||
public function hasPage($model = null, $page = 1) {
|
||||
|
|
|
@ -106,7 +106,7 @@ class PrototypeEngineHelper extends JsBaseEngineHelper {
|
|||
* Create javascript selector for a CSS rule
|
||||
*
|
||||
* @param string $selector The selector that is targeted
|
||||
* @return object instance of $this. Allows chained methods.
|
||||
* @return PrototypeEngineHelper instance of $this. Allows chained methods.
|
||||
*/
|
||||
public function get($selector) {
|
||||
$this->_multiple = false;
|
||||
|
|
|
@ -37,7 +37,7 @@ class SessionHelper extends AppHelper {
|
|||
* Calling the method without a param will return all session vars
|
||||
*
|
||||
* @param string $name the name of the session key you want to read
|
||||
* @return values from the session vars
|
||||
* @return mixed values from the session vars
|
||||
* @link http://book.cakephp.org/view/1466/Methods
|
||||
*/
|
||||
public function read($name = null) {
|
||||
|
|
|
@ -45,7 +45,6 @@ class TimeHelper extends AppHelper {
|
|||
*
|
||||
* @param View $View the view object the helper is attached to.
|
||||
* @param array $settings Settings array Settings array
|
||||
* @return void
|
||||
*/
|
||||
public function __construct(View $View, $settings = array()) {
|
||||
if (isset($settings['niceFormat'])) {
|
||||
|
@ -172,7 +171,7 @@ class TimeHelper extends AppHelper {
|
|||
* Converts given time (in server's time zone) to user's local time, given his/her offset from GMT.
|
||||
*
|
||||
* @param string $serverTime UNIX timestamp
|
||||
* @param int $userOffset User's offset from GMT (in hours)
|
||||
* @param integer $userOffset User's offset from GMT (in hours)
|
||||
* @return string UNIX timestamp
|
||||
*/
|
||||
public function convert($serverTime, $userOffset) {
|
||||
|
@ -185,7 +184,7 @@ class TimeHelper extends AppHelper {
|
|||
/**
|
||||
* Returns server's offset from GMT in seconds.
|
||||
*
|
||||
* @return int Offset
|
||||
* @return integer Offset
|
||||
*/
|
||||
public function serverOffset() {
|
||||
return date('Z', time());
|
||||
|
@ -195,7 +194,7 @@ class TimeHelper extends AppHelper {
|
|||
* Returns a UNIX timestamp, given either a UNIX timestamp or a valid strtotime() date string.
|
||||
*
|
||||
* @param string $dateString Datetime string
|
||||
* @param int $userOffset User's offset from GMT (in hours)
|
||||
* @param integer $userOffset User's offset from GMT (in hours)
|
||||
* @return string Parsed timestamp
|
||||
* @link http://book.cakephp.org/view/1471/Formatting
|
||||
*/
|
||||
|
@ -224,7 +223,7 @@ class TimeHelper extends AppHelper {
|
|||
* using locale strings.
|
||||
*
|
||||
* @param string $dateString Datetime string or Unix timestamp
|
||||
* @param int $userOffset User's offset from GMT (in hours)
|
||||
* @param integer $userOffset User's offset from GMT (in hours)
|
||||
* @param string $format The format to use. If null, `TimeHelper::$niceFormat` is used
|
||||
* @return string Formatted date string
|
||||
* @link http://book.cakephp.org/view/1471/Formatting
|
||||
|
@ -251,7 +250,7 @@ class TimeHelper extends AppHelper {
|
|||
* include mention of the year.
|
||||
*
|
||||
* @param string $dateString Datetime string or Unix timestamp
|
||||
* @param int $userOffset User's offset from GMT (in hours)
|
||||
* @param integer $userOffset User's offset from GMT (in hours)
|
||||
* @return string Described, relative date string
|
||||
* @link http://book.cakephp.org/view/1471/Formatting
|
||||
*/
|
||||
|
@ -278,7 +277,7 @@ class TimeHelper extends AppHelper {
|
|||
* @param string $begin Datetime string or Unix timestamp
|
||||
* @param string $end Datetime string or Unix timestamp
|
||||
* @param string $fieldName Name of database field to compare with
|
||||
* @param int $userOffset User's offset from GMT (in hours)
|
||||
* @param integer $userOffset User's offset from GMT (in hours)
|
||||
* @return string Partial SQL string.
|
||||
* @link http://book.cakephp.org/view/1471/Formatting
|
||||
*/
|
||||
|
@ -297,7 +296,7 @@ class TimeHelper extends AppHelper {
|
|||
*
|
||||
* @param string $dateString Datetime string or Unix timestamp
|
||||
* @param string $fieldName Name of database field to compare with
|
||||
* @param int $userOffset User's offset from GMT (in hours)
|
||||
* @param integer $userOffset User's offset from GMT (in hours)
|
||||
* @return string Partial SQL string.
|
||||
* @link http://book.cakephp.org/view/1471/Formatting
|
||||
*/
|
||||
|
@ -310,7 +309,7 @@ class TimeHelper extends AppHelper {
|
|||
* Returns true if given datetime string is today.
|
||||
*
|
||||
* @param string $dateString Datetime string or Unix timestamp
|
||||
* @param int $userOffset User's offset from GMT (in hours)
|
||||
* @param integer $userOffset User's offset from GMT (in hours)
|
||||
* @return boolean True if datetime string is today
|
||||
*/
|
||||
public function isToday($dateString, $userOffset = null) {
|
||||
|
@ -322,7 +321,7 @@ class TimeHelper extends AppHelper {
|
|||
* Returns true if given datetime string is within this week.
|
||||
*
|
||||
* @param string $dateString
|
||||
* @param int $userOffset User's offset from GMT (in hours)
|
||||
* @param integer $userOffset User's offset from GMT (in hours)
|
||||
* @return boolean True if datetime string is within current week
|
||||
* @link http://book.cakephp.org/view/1472/Testing-Time
|
||||
*/
|
||||
|
@ -334,7 +333,7 @@ class TimeHelper extends AppHelper {
|
|||
/**
|
||||
* Returns true if given datetime string is within this month
|
||||
* @param string $dateString
|
||||
* @param int $userOffset User's offset from GMT (in hours)
|
||||
* @param integer $userOffset User's offset from GMT (in hours)
|
||||
* @return boolean True if datetime string is within current month
|
||||
* @link http://book.cakephp.org/view/1472/Testing-Time
|
||||
*/
|
||||
|
@ -360,7 +359,7 @@ class TimeHelper extends AppHelper {
|
|||
* Returns true if given datetime string was yesterday.
|
||||
*
|
||||
* @param string $dateString Datetime string or Unix timestamp
|
||||
* @param int $userOffset User's offset from GMT (in hours)
|
||||
* @param integer $userOffset User's offset from GMT (in hours)
|
||||
* @return boolean True if datetime string was yesterday
|
||||
* @link http://book.cakephp.org/view/1472/Testing-Time
|
||||
*
|
||||
|
@ -374,7 +373,7 @@ class TimeHelper extends AppHelper {
|
|||
* Returns true if given datetime string is tomorrow.
|
||||
*
|
||||
* @param string $dateString Datetime string or Unix timestamp
|
||||
* @param int $userOffset User's offset from GMT (in hours)
|
||||
* @param integer $userOffset User's offset from GMT (in hours)
|
||||
* @return boolean True if datetime string was yesterday
|
||||
* @link http://book.cakephp.org/view/1472/Testing-Time
|
||||
*/
|
||||
|
@ -424,7 +423,7 @@ class TimeHelper extends AppHelper {
|
|||
* Returns a UNIX timestamp from a textual datetime description. Wrapper for PHP function strtotime().
|
||||
*
|
||||
* @param string $dateString Datetime string to be represented as a Unix timestamp
|
||||
* @param int $userOffset User's offset from GMT (in hours)
|
||||
* @param integer $userOffset User's offset from GMT (in hours)
|
||||
* @return integer Unix timestamp
|
||||
* @link http://book.cakephp.org/view/1471/Formatting
|
||||
*/
|
||||
|
@ -436,7 +435,7 @@ class TimeHelper extends AppHelper {
|
|||
* Returns a date formatted for Atom RSS feeds.
|
||||
*
|
||||
* @param string $dateString Datetime string or Unix timestamp
|
||||
* @param int $userOffset User's offset from GMT (in hours)
|
||||
* @param integer $userOffset User's offset from GMT (in hours)
|
||||
* @return string Formatted date string
|
||||
* @link http://book.cakephp.org/view/1471/Formatting
|
||||
*/
|
||||
|
@ -449,7 +448,7 @@ class TimeHelper extends AppHelper {
|
|||
* Formats date for RSS feeds
|
||||
*
|
||||
* @param string $dateString Datetime string or Unix timestamp
|
||||
* @param int $userOffset User's offset from GMT (in hours)
|
||||
* @param integer $userOffset User's offset from GMT (in hours)
|
||||
* @return string Formatted date string
|
||||
* @link http://book.cakephp.org/view/1471/Formatting
|
||||
*/
|
||||
|
@ -645,8 +644,8 @@ class TimeHelper extends AppHelper {
|
|||
* @param mixed $timeInterval the numeric value with space then time type.
|
||||
* Example of valid types: 6 hours, 2 days, 1 minute.
|
||||
* @param mixed $dateString the datestring or unix timestamp to compare
|
||||
* @param int $userOffset User's offset from GMT (in hours)
|
||||
* @return bool
|
||||
* @param integer $userOffset User's offset from GMT (in hours)
|
||||
* @return boolean
|
||||
* @link http://book.cakephp.org/view/1472/Testing-Time
|
||||
*/
|
||||
public function wasWithinLast($timeInterval, $dateString, $userOffset = null) {
|
||||
|
@ -721,7 +720,7 @@ class TimeHelper extends AppHelper {
|
|||
* @param string $date Datetime string
|
||||
* @param string $format strftime format string.
|
||||
* @param boolean $invalid flag to ignore results of fromString == false
|
||||
* @param int $userOffset User's offset from GMT (in hours)
|
||||
* @param integer $userOffset User's offset from GMT (in hours)
|
||||
* @return string Formatted and translated date string
|
||||
*/
|
||||
public function i18nFormat($date, $format = null, $invalid = false, $userOffset = null) {
|
||||
|
|
|
@ -31,7 +31,6 @@ class HelperCollection extends ObjectCollection {
|
|||
* Constructor
|
||||
*
|
||||
* @param View $view
|
||||
* @return void
|
||||
*/
|
||||
public function __construct(View $view) {
|
||||
$this->_View = $view;
|
||||
|
|
|
@ -72,7 +72,7 @@ class MediaView extends View {
|
|||
/**
|
||||
* Constructor
|
||||
*
|
||||
* @param object $controller The controller with viewVars
|
||||
* @param Controller $controller The controller with viewVars
|
||||
*/
|
||||
public function __construct($controller = null) {
|
||||
parent::__construct($controller);
|
||||
|
|
Loading…
Reference in a new issue