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 helper 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.View
* @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');
@ -37,7 +38,7 @@ class HelperCollection extends ObjectCollection implements CakeEventListener {
/**
* Constructor
*
* @param View $view
* @param View $view View instance.
*/
public function __construct(View $view) {
$this->_View = $view;
@ -49,7 +50,7 @@ class HelperCollection extends ObjectCollection implements CakeEventListener {
* if any
*
* @param string $helper The helper name to be loaded
* @return boolean wheter the helper could be loaded or not
* @return bool whether the helper could be loaded or not
* @throws MissingHelperException When a helper could not be found.
* App helpers are searched, and then plugin helpers.
*/
@ -91,19 +92,19 @@ class HelperCollection extends ObjectCollection implements CakeEventListener {
}
/**
* Loads/constructs a helper. Will return the instance in the registry if it already exists.
* By setting `$enable` to false you can disable callbacks for a helper. Alternatively you
* can set `$settings['enabled'] = false` to disable callbacks. This alias is provided so that when
* Loads/constructs a helper. Will return the instance in the registry if it already exists.
* By setting `$enable` to false you can disable callbacks for a helper. Alternatively you
* can set `$settings['enabled'] = false` to disable callbacks. This alias is provided so that when
* declaring $helpers arrays you can disable callbacks on helpers.
*
* You can alias your helper as an existing helper by setting the 'className' key, i.e.,
* {{{
* ```
* public $helpers = array(
* 'Html' => array(
* 'className' => 'AliasedHtml'
* );
* );
* }}}
* ```
* All calls to the `Html` helper would use `AliasedHtml` instead.
*
* @param string $helper Helper name to load
@ -112,7 +113,7 @@ class HelperCollection extends ObjectCollection implements CakeEventListener {
* @throws MissingHelperException when the helper could not be found
*/
public function load($helper, $settings = array()) {
if (is_array($settings) && isset($settings['className'])) {
if (isset($settings['className'])) {
$alias = $helper;
$helper = $settings['className'];
}
@ -163,7 +164,7 @@ class HelperCollection extends ObjectCollection implements CakeEventListener {
/**
* Trigger a callback method on every object in the collection.
* Used to trigger methods on objects in the collection. Will fire the methods in the
* Used to trigger methods on objects in the collection. Will fire the methods in the
* order they were attached.
*
* ### Options
@ -172,7 +173,7 @@ class HelperCollection extends ObjectCollection implements CakeEventListener {
* Can either be a scalar value, or an array of values to break on. Defaults to `false`.
*
* - `break` Set to true to enabled breaking. When a trigger is broken, the last returned value
* will be returned. If used in combination with `collectReturn` the collected results will be returned.
* will be returned. If used in combination with `collectReturn` the collected results will be returned.
* Defaults to `false`.
*
* - `collectReturn` Set to true to collect the return of each object into an array.
@ -183,8 +184,7 @@ class HelperCollection extends ObjectCollection implements CakeEventListener {
* Any non-null value will modify the parameter index indicated.
* Defaults to false.
*
*
* @param string $callback|CakeEvent Method to fire on all the objects. Its assumed all the objects implement
* @param string|CakeEvent $callback Method to fire on all the objects. Its assumed all the objects implement
* the method you are calling. If an instance of CakeEvent is provided, then then Event name will parsed to
* get the callback name. This is done by getting the last word after any dot in the event name
* (eg. `Model.afterSave` event will trigger the `afterSave` callback)