Upgrade CakePHP from 2.2.5 to 2.9.5

This commit is contained in:
Brm Ko 2017-02-26 15:29:44 +01:00
parent 5a580df460
commit 235a541597
793 changed files with 60746 additions and 23753 deletions

View file

@ -1,31 +1,30 @@
<?php
/**
*
* PHP 5
*
* CakePHP(tm) : Rapid Development Framework (http://cakephp.org)
* Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org)
* Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
*
* Licensed under The MIT License
* For full copyright and license information, please see the LICENSE.txt
* Redistributions of files must retain the above copyright notice.
*
* @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org)
* @copyright Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
* @link http://cakephp.org CakePHP(tm) Project
* @package Cake.Controller
* @since CakePHP(tm) v 1.2
* @license MIT License (http://www.opensource.org/licenses/mit-license.php)
* @license http://www.opensource.org/licenses/mit-license.php MIT License
*/
App::uses('ComponentCollection', 'Controller');
/**
* Base class for an individual Component. Components provide reusable bits of
* controller logic that can be composed into a controller. Components also
* Base class for an individual Component. Components provide reusable bits of
* controller logic that can be composed into a controller. Components also
* provide request life-cycle callbacks for injecting logic at specific points.
*
* ## Life cycle callbacks
*
* Components can provide several callbacks that are fired at various stages of the request
* cycle. The available callbacks are:
* cycle. The available callbacks are:
*
* - `initialize()` - Fired before the controller's beforeFilter method.
* - `startup()` - Fired after the controller's beforeFilter method.
@ -38,7 +37,7 @@ App::uses('ComponentCollection', 'Controller');
* @link http://book.cakephp.org/2.0/en/controllers/components.html
* @see Controller::$components
*/
class Component extends Object {
class Component extends CakeObject {
/**
* Component collection class used to lazy load components.
@ -91,7 +90,7 @@ class Component extends Object {
*/
public function __get($name) {
if (isset($this->_componentMap[$name]) && !isset($this->{$name})) {
$settings = array_merge((array)$this->_componentMap[$name]['settings'], array('enabled' => false));
$settings = (array)$this->_componentMap[$name]['settings'] + array('enabled' => false);
$this->{$name} = $this->_Collection->load($this->_componentMap[$name]['class'], $settings);
}
if (isset($this->{$name})) {
@ -135,29 +134,29 @@ class Component extends Object {
*
* @param Controller $controller Controller with components to shutdown
* @return void
* @link @link http://book.cakephp.org/2.0/en/controllers/components.html#Component::shutdown
* @link http://book.cakephp.org/2.0/en/controllers/components.html#Component::shutdown
*/
public function shutdown(Controller $controller) {
}
/**
* Called before Controller::redirect(). Allows you to replace the url that will
* be redirected to with a new url. The return of this method can either be an array or a string.
* Called before Controller::redirect(). Allows you to replace the URL that will
* be redirected to with a new URL. The return of this method can either be an array or a string.
*
* If the return is an array and contains a 'url' key. You may also supply the following:
* If the return is an array and contains a 'url' key. You may also supply the following:
*
* - `status` The status code for the redirect
* - `exit` Whether or not the redirect should exit.
*
* 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.
* be used as the new URL to redirect to.
*
* @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.
* @param string|array $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 array|null Either an array or null.
* @link @link http://book.cakephp.org/2.0/en/controllers/components.html#Component::beforeRedirect
* @link http://book.cakephp.org/2.0/en/controllers/components.html#Component::beforeRedirect
*/
public function beforeRedirect(Controller $controller, $url, $status = null, $exit = true) {
}