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

@ -4,16 +4,17 @@
* and constructing component class objects.
*
* 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 2.0
* @license MIT License (http://www.opensource.org/licenses/mit-license.php)
* @license http://www.opensource.org/licenses/mit-license.php MIT License
*/
App::uses('ObjectCollection', 'Utility');
@ -53,28 +54,38 @@ class ComponentCollection extends ObjectCollection implements CakeEventListener
}
}
/**
* Set the controller associated with the collection.
*
* @param Controller $Controller Controller to set
* @return void
*/
public function setController(Controller $Controller) {
$this->_Controller = $Controller;
}
/**
* Get the controller associated with the collection.
*
* @return Controller.
* @return Controller Controller instance
*/
public function getController() {
return $this->_Controller;
}
/**
* Loads/constructs a component. Will return the instance in the registry if it already exists.
* Loads/constructs a component. Will return the instance in the registry if it already exists.
* You can use `$settings['enabled'] = false` to disable callbacks on a component when loading it.
* Callbacks default to on. Disabled component methods work as normal, only callbacks are disabled.
* Callbacks default to on. Disabled component methods work as normal, only callbacks are disabled.
*
* You can alias your component as an existing component by setting the 'className' key, i.e.,
* {{{
* ```
* public $components = array(
* 'Email' => array(
* 'className' => 'AliasedEmail'
* );
* );
* }}}
* ```
* All calls to the `Email` component would use `AliasedEmail` instead.
*
* @param string $component Component name to load
@ -83,7 +94,7 @@ class ComponentCollection extends ObjectCollection implements CakeEventListener
* @throws MissingComponentException when the component could not be found
*/
public function load($component, $settings = array()) {
if (is_array($settings) && isset($settings['className'])) {
if (isset($settings['className'])) {
$alias = $component;
$component = $settings['className'];
}