diff --git a/lib/Cake/Console/ShellDispatcher.php b/lib/Cake/Console/ShellDispatcher.php index dfc92bd07..9b32568a3 100644 --- a/lib/Cake/Console/ShellDispatcher.php +++ b/lib/Cake/Console/ShellDispatcher.php @@ -201,12 +201,11 @@ class ShellDispatcher { * * @param string $shell Optionally the name of a plugin * @return mixed An object - * @throws MissingShellFileException when errors are encountered. + * @throws MissingShellException when errors are encountered. */ protected function _getShell($shell) { list($plugin, $shell) = pluginSplit($shell, true); - $class = Inflector::camelize($shell) . 'Shell'; App::uses('Shell', 'Console'); @@ -214,7 +213,9 @@ class ShellDispatcher { App::uses($class, $plugin . 'Console/Command'); if (!class_exists($class)) { - throw new MissingShellFileException(array('shell' => $shell)); + throw new MissingShellException(array( + 'class' => $class + )); } $Shell = new $class(); return $Shell; diff --git a/lib/Cake/Console/TaskCollection.php b/lib/Cake/Console/TaskCollection.php index 55e77327d..c82ddb560 100644 --- a/lib/Cake/Console/TaskCollection.php +++ b/lib/Cake/Console/TaskCollection.php @@ -54,7 +54,7 @@ class TaskCollection extends ObjectCollection { * @param string $task Task name to load * @param array $settings Settings for the task. * @return Task A task object, Either the existing loaded task or a new one. - * @throws MissingTaskFileException, MissingTaskClassException when the task could not be found + * @throws MissingTaskException when the task could not be found */ public function load($task, $settings = array()) { list($plugin, $name) = pluginSplit($task, true); @@ -66,7 +66,9 @@ class TaskCollection extends ObjectCollection { App::uses($taskClass, $plugin . 'Console/Command/Task'); if (!class_exists($taskClass)) { if (!class_exists($taskClass)) { - throw new MissingTaskClassException($taskClass); + throw new MissingTaskException(array( + 'class' => $taskClass + )); } } diff --git a/lib/Cake/Console/Templates/default/actions/controller_actions.ctp b/lib/Cake/Console/Templates/default/actions/controller_actions.ctp index 7665047b3..e61424fdb 100644 --- a/lib/Cake/Console/Templates/default/actions/controller_actions.ctp +++ b/lib/Cake/Console/Templates/default/actions/controller_actions.ctp @@ -12,7 +12,7 @@ * * @copyright Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link http://cakephp.org CakePHP(tm) Project - * @package cake.console.libs.template.objects + * @package Cake.Console.Templates.default.actions * @since CakePHP(tm) v 1.3 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ diff --git a/lib/Cake/Console/Templates/default/classes/controller.ctp b/lib/Cake/Console/Templates/default/classes/controller.ctp index ba3c343f7..eec49119c 100644 --- a/lib/Cake/Console/Templates/default/classes/controller.ctp +++ b/lib/Cake/Console/Templates/default/classes/controller.ctp @@ -14,7 +14,7 @@ * * @copyright Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link http://cakephp.org CakePHP(tm) Project - * @package Cake.Console.Templates.default.actions + * @package Cake.Console.Templates.default.classes * @since CakePHP(tm) v 1.3 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ diff --git a/lib/Cake/Console/Templates/default/classes/fixture.ctp b/lib/Cake/Console/Templates/default/classes/fixture.ctp index d8049a5a9..64f1d1a36 100644 --- a/lib/Cake/Console/Templates/default/classes/fixture.ctp +++ b/lib/Cake/Console/Templates/default/classes/fixture.ctp @@ -14,7 +14,7 @@ * * @copyright Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link http://cakephp.org CakePHP(tm) Project - * @package Cake.Console.Templates.default.actions + * @package Cake.Console.Templates.default.classes * @since CakePHP(tm) v 1.3 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ diff --git a/lib/Cake/Console/Templates/default/classes/model.ctp b/lib/Cake/Console/Templates/default/classes/model.ctp index 8b1c51996..6b6224881 100644 --- a/lib/Cake/Console/Templates/default/classes/model.ctp +++ b/lib/Cake/Console/Templates/default/classes/model.ctp @@ -14,7 +14,7 @@ * * @copyright Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link http://cakephp.org CakePHP(tm) Project - * @package Cake.Console.Templates.default.actions + * @package Cake.Console.Templates.default.classes * @since CakePHP(tm) v 1.3 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ diff --git a/lib/Cake/Console/Templates/default/classes/test.ctp b/lib/Cake/Console/Templates/default/classes/test.ctp index 29183eff5..ca394cf20 100644 --- a/lib/Cake/Console/Templates/default/classes/test.ctp +++ b/lib/Cake/Console/Templates/default/classes/test.ctp @@ -13,7 +13,7 @@ * * @copyright Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link http://cakephp.org CakePHP(tm) Project - * @package Cake.Console.Templates.default.actions + * @package Cake.Console.Templates.default.classes * @since CakePHP(tm) v 1.3 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ diff --git a/lib/Cake/Console/Templates/default/views/form.ctp b/lib/Cake/Console/Templates/default/views/form.ctp index 1c24cfbd5..ccbed5454 100644 --- a/lib/Cake/Console/Templates/default/views/form.ctp +++ b/lib/Cake/Console/Templates/default/views/form.ctp @@ -11,7 +11,7 @@ * * @copyright Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link http://cakephp.org CakePHP(tm) Project - * @package cake.console.libs.templates.views + * @package Cake.Console.Templates.default.views * @since CakePHP(tm) v 1.2.0.5234 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ diff --git a/lib/Cake/Console/Templates/default/views/index.ctp b/lib/Cake/Console/Templates/default/views/index.ctp index e5eb593aa..b332daced 100644 --- a/lib/Cake/Console/Templates/default/views/index.ctp +++ b/lib/Cake/Console/Templates/default/views/index.ctp @@ -11,7 +11,7 @@ * * @copyright Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link http://cakephp.org CakePHP(tm) Project - * @package cake.console.libs.templates.views + * @package Cake.Console.Templates.default.views * @since CakePHP(tm) v 1.2.0.5234 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ diff --git a/lib/Cake/Console/Templates/default/views/view.ctp b/lib/Cake/Console/Templates/default/views/view.ctp index 3e25b6918..7095f7dfe 100644 --- a/lib/Cake/Console/Templates/default/views/view.ctp +++ b/lib/Cake/Console/Templates/default/views/view.ctp @@ -11,7 +11,7 @@ * * @copyright Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link http://cakephp.org CakePHP(tm) Project - * @package cake.console.libs.templates.views + * @package Cake.Console.Templates.default.views * @since CakePHP(tm) v 1.2.0.5234 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ diff --git a/lib/Cake/Console/Templates/skel/Controller/AppController.php b/lib/Cake/Console/Templates/skel/Controller/AppController.php index 15db7c208..a46563f02 100644 --- a/lib/Cake/Console/Templates/skel/Controller/AppController.php +++ b/lib/Cake/Console/Templates/skel/Controller/AppController.php @@ -28,7 +28,7 @@ App::uses('Controller', 'Controller'); * Add your application-wide methods in the class below, your controllers * will inherit them. * - * @package Cake.Console.Templates.skel.Controller + * @package app.Controller */ class AppController extends Controller { } diff --git a/lib/Cake/Console/Templates/skel/Controller/PagesController.php b/lib/Cake/Console/Templates/skel/Controller/PagesController.php index cf34b0a2a..0fd243970 100644 --- a/lib/Cake/Console/Templates/skel/Controller/PagesController.php +++ b/lib/Cake/Console/Templates/skel/Controller/PagesController.php @@ -14,7 +14,7 @@ * * @copyright Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link http://cakephp.org CakePHP(tm) Project - * @package Cake.Console.Templates.skel.Controller + * @package app.Controller * @since CakePHP(tm) v 0.2.9 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ @@ -24,7 +24,7 @@ * * Override this controller by placing a copy in controllers directory of an application * - * @package Cake.Console.Templates.skel.Controller + * @package app.Controller */ class PagesController extends AppController { diff --git a/lib/Cake/Console/Templates/skel/Model/AppModel.php b/lib/Cake/Console/Templates/skel/Model/AppModel.php index 141ec88e8..4c9b8bde7 100644 --- a/lib/Cake/Console/Templates/skel/Model/AppModel.php +++ b/lib/Cake/Console/Templates/skel/Model/AppModel.php @@ -28,7 +28,7 @@ App::uses('Model', 'Model'); * Add your application-wide methods in the class below, your models * will inherit them. * - * @package Cake.Console.Templates.skel.Model + * @package app.Model */ class AppModel extends Model { } diff --git a/lib/Cake/Console/Templates/skel/View/Emails/html/default.ctp b/lib/Cake/Console/Templates/skel/View/Emails/html/default.ctp index 0f59cc229..15f15ea39 100644 --- a/lib/Cake/Console/Templates/skel/View/Emails/html/default.ctp +++ b/lib/Cake/Console/Templates/skel/View/Emails/html/default.ctp @@ -11,7 +11,7 @@ * * @copyright Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link http://cakephp.org CakePHP(tm) Project - * @package cake.libs.view.templates.elements.email.html + * @package app.View.Emails.html * @since CakePHP(tm) v 0.10.0.1076 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ diff --git a/lib/Cake/Console/Templates/skel/View/Emails/text/default.ctp b/lib/Cake/Console/Templates/skel/View/Emails/text/default.ctp index ac40c7d84..097ffd8c6 100644 --- a/lib/Cake/Console/Templates/skel/View/Emails/text/default.ctp +++ b/lib/Cake/Console/Templates/skel/View/Emails/text/default.ctp @@ -11,7 +11,7 @@ * * @copyright Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link http://cakephp.org CakePHP(tm) Project - * @package cake.libs.view.templates.elements.email.text + * @package app.View.Emails.text * @since CakePHP(tm) v 0.10.0.1076 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ diff --git a/lib/Cake/Console/Templates/skel/View/Helper/AppHelper.php b/lib/Cake/Console/Templates/skel/View/Helper/AppHelper.php index a4b496bf1..c31df1ab6 100644 --- a/lib/Cake/Console/Templates/skel/View/Helper/AppHelper.php +++ b/lib/Cake/Console/Templates/skel/View/Helper/AppHelper.php @@ -15,6 +15,7 @@ * * @copyright Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link http://cakephp.org CakePHP(tm) Project + * @package app.View.Helper * @since CakePHP(tm) v 0.2.9 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ @@ -27,7 +28,7 @@ App::uses('Helper', 'View'); * Add your application-wide methods in the class below, your helpers * will inherit them. * - * @package Cake.Console.Templates.skel.View.Helper + * @package app.View.Helper */ class AppHelper extends Helper { } diff --git a/lib/Cake/Console/Templates/skel/View/Layouts/ajax.ctp b/lib/Cake/Console/Templates/skel/View/Layouts/ajax.ctp index 177bee8d3..a4aa997ff 100644 --- a/lib/Cake/Console/Templates/skel/View/Layouts/ajax.ctp +++ b/lib/Cake/Console/Templates/skel/View/Layouts/ajax.ctp @@ -11,7 +11,7 @@ * * @copyright Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link http://cakephp.org CakePHP(tm) Project - * @package cake.libs.view.templates.layouts + * @package app.View.Layouts * @since CakePHP(tm) v 0.10.0.1076 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ diff --git a/lib/Cake/Controller/ComponentCollection.php b/lib/Cake/Controller/ComponentCollection.php index 68cc443b3..59b218450 100644 --- a/lib/Cake/Controller/ComponentCollection.php +++ b/lib/Cake/Controller/ComponentCollection.php @@ -73,7 +73,7 @@ class ComponentCollection extends ObjectCollection { * @param string $component Component name to load * @param array $settings Settings for the component. * @return Component A component object, Either the existing loaded component or a new one. - * @throws MissingComponentFileException, MissingComponentClassException when the component could not be found + * @throws MissingComponentException when the component could not be found */ public function load($component, $settings = array()) { if (is_array($settings) && isset($settings['className'])) { @@ -90,8 +90,7 @@ class ComponentCollection extends ObjectCollection { $componentClass = $name . 'Component'; App::uses($componentClass, $plugin . 'Controller/Component'); if (!class_exists($componentClass)) { - throw new MissingComponentClassException(array( - 'file' => Inflector::underscore($componentClass) . '.php', + throw new MissingComponentException(array( 'class' => $componentClass )); } diff --git a/lib/Cake/Error/exceptions.php b/lib/Cake/Error/exceptions.php index 65b4fb5ab..12863463b 100644 --- a/lib/Cake/Error/exceptions.php +++ b/lib/Cake/Error/exceptions.php @@ -241,37 +241,23 @@ class PrivateActionException extends CakeException { } /** - * Used when a Component file cannot be found. + * Used when a component cannot be found. * * @package Cake.Error */ -class MissingComponentFileException extends CakeException { - protected $_messageTemplate = 'Component file "%s" is missing.'; +class MissingComponentException extends CakeException { + protected $_messageTemplate = 'Component class %s could not be found.'; } /** - * Used when a Component class cannot be found. + * Used when a behavior cannot be found. * * @package Cake.Error */ -class MissingComponentClassException extends CakeException { - protected $_messageTemplate = 'Component class "%s" is missing.'; +class MissingBehaviorException extends CakeException { + protected $_messageTemplate = 'Behavior class %s could not be found.'; } -/** - * Used when a Behavior file cannot be found. - * - * @package Cake.Error - */ -class MissingBehaviorFileException extends CakeException { } - -/** - * Used when a Behavior class cannot be found. - * - * @package Cake.Error - */ -class MissingBehaviorClassException extends CakeException { } - /** * Used when a view file cannot be found. * @@ -291,24 +277,14 @@ class MissingLayoutException extends CakeException { } /** - * Used when a helper file cannot be found. + * Used when a helper cannot be found. * * @package Cake.Error */ -class MissingHelperFileException extends CakeException { - protected $_messageTemplate = 'Helper file "%s" is missing.'; +class MissingHelperException extends CakeException { + protected $_messageTemplate = 'Helper class %s could not be found.'; } -/** - * Used when a helper class cannot be found. - * - * @package Cake.Error - */ -class MissingHelperClassException extends CakeException { - protected $_messageTemplate = 'Helper class "%s" is missing.'; -} - - /** * Runtime Exceptions for ConnectionManager * @@ -328,21 +304,12 @@ class MissingConnectionException extends CakeException { } /** - * Used when a Task file cannot be found. + * Used when a Task cannot be found. * * @package Cake.Error */ -class MissingTaskFileException extends CakeException { - protected $_messageTemplate = 'Task file "%s" is missing.'; -} - -/** - * Used when a Task class cannot be found. - * - * @package Cake.Error - */ -class MissingTaskClassException extends CakeException { - protected $_messageTemplate = 'Task class "%s" is missing.'; +class MissingTaskException extends CakeException { + protected $_messageTemplate = 'Task class %s could not be found.'; } /** @@ -355,21 +322,12 @@ class MissingShellMethodException extends CakeException { } /** - * Used when a shell class cannot be found. + * Used when a shell cannot be found. * * @package Cake.Error */ -class MissingShellClassException extends CakeException { - protected $_messageTemplate = "Shell class %s could not be loaded."; -} - -/** - * Used when a shell file cannot be found. - * - * @package Cake.Error - */ -class MissingShellFileException extends CakeException { - protected $_messageTemplate = "Shell file %s could not be loaded."; +class MissingShellException extends CakeException { + protected $_messageTemplate = 'Shell class %s could not be found.'; } /** @@ -382,12 +340,12 @@ class MissingDatasourceConfigException extends CakeException { } /** - * Exception class to be thrown when a datasource is not found + * Used when a datasource cannot be found. * * @package Cake.Error */ -class MissingDatasourceFileException extends CakeException { - protected $_messageTemplate = 'Datasource "%s" was not found.'; +class MissingDatasourceException extends CakeException { + protected $_messageTemplate = 'Datasource class %s could not be found.'; } /** diff --git a/lib/Cake/Model/AclNode.php b/lib/Cake/Model/AclNode.php index 313a297bd..e74cb01b9 100644 --- a/lib/Cake/Model/AclNode.php +++ b/lib/Cake/Model/AclNode.php @@ -41,7 +41,7 @@ class AclNode extends AppModel { * * @var array */ - public $actsAs = array('Tree' => array('nested')); + public $actsAs = array('Tree' => array('type' => 'nested')); /** * Constructor diff --git a/lib/Cake/Model/Behavior/AclBehavior.php b/lib/Cake/Model/Behavior/AclBehavior.php index 3d106394b..ed1379411 100644 --- a/lib/Cake/Model/Behavior/AclBehavior.php +++ b/lib/Cake/Model/Behavior/AclBehavior.php @@ -36,17 +36,18 @@ class AclBehavior extends ModelBehavior { protected $_typeMaps = array('requester' => 'Aro', 'controlled' => 'Aco', 'both' => array('Aro', 'Aco')); /** - * Sets up the configuation for the model, and loads ACL models if they haven't been already + * Sets up the configuration for the model, and loads ACL models if they haven't been already * * @param Model $model * @param array $config * @return void */ public function setup($model, $config = array()) { - if (is_string($config)) { - $config = array('type' => $config); + if (isset($config[0])) { + $config['type'] = $config[0]; + unset($config[0]); } - $this->settings[$model->name] = array_merge(array('type' => 'controlled'), (array)$config); + $this->settings[$model->name] = array_merge(array('type' => 'controlled'), $config); $this->settings[$model->name]['type'] = strtolower($this->settings[$model->name]['type']); $types = $this->_typeMaps[$this->settings[$model->name]['type']]; diff --git a/lib/Cake/Model/Behavior/ContainableBehavior.php b/lib/Cake/Model/Behavior/ContainableBehavior.php index 9c057f40b..f76d2f8d2 100644 --- a/lib/Cake/Model/Behavior/ContainableBehavior.php +++ b/lib/Cake/Model/Behavior/ContainableBehavior.php @@ -64,9 +64,6 @@ class ContainableBehavior extends ModelBehavior { if (!isset($this->settings[$Model->alias])) { $this->settings[$Model->alias] = array('recursive' => true, 'notices' => true, 'autoFields' => true); } - if (!is_array($settings)) { - $settings = array(); - } $this->settings[$Model->alias] = array_merge($this->settings[$Model->alias], $settings); } diff --git a/lib/Cake/Model/Behavior/TreeBehavior.php b/lib/Cake/Model/Behavior/TreeBehavior.php index dc1aa8cf3..2be27bd94 100644 --- a/lib/Cake/Model/Behavior/TreeBehavior.php +++ b/lib/Cake/Model/Behavior/TreeBehavior.php @@ -55,8 +55,9 @@ class TreeBehavior extends ModelBehavior { * @return void */ public function setup($Model, $config = array()) { - if (!is_array($config)) { - $config = array('type' => $config); + if (isset($config[0])) { + $config['type'] = $config[0]; + unset($config[0]); } $settings = array_merge($this->_defaults, $config); diff --git a/lib/Cake/Model/BehaviorCollection.php b/lib/Cake/Model/BehaviorCollection.php index 086fba3d7..b76c6cae0 100644 --- a/lib/Cake/Model/BehaviorCollection.php +++ b/lib/Cake/Model/BehaviorCollection.php @@ -99,7 +99,7 @@ class BehaviorCollection extends ObjectCollection { * @param string $behavior CamelCased name of the behavior to load * @param array $config Behavior configuration parameters * @return boolean True on success, false on failure - * @throws MissingBehaviorClassException when a behavior could not be found. + * @throws MissingBehaviorException when a behavior could not be found. */ public function load($behavior, $config = array()) { if (is_array($config) && isset($config['className'])) { @@ -115,9 +115,9 @@ class BehaviorCollection extends ObjectCollection { App::uses($class, $plugin . 'Model/Behavior'); if (!class_exists($class)) { - throw new MissingBehaviorClassException(array( - 'file' => Inflector::underscore($behavior) . '.php', - 'class' => $class + throw new MissingBehaviorException(array( + 'class' => $class, + 'plugin' => substr($plugin, 0, -1) )); } diff --git a/lib/Cake/Model/ConnectionManager.php b/lib/Cake/Model/ConnectionManager.php index 2e74b5c13..a05b4b3a0 100644 --- a/lib/Cake/Model/ConnectionManager.php +++ b/lib/Cake/Model/ConnectionManager.php @@ -75,7 +75,7 @@ class ConnectionManager { * @param string $name The name of the DataSource, as defined in app/Config/database.php * @return DataSource Instance * @throws MissingDatasourceConfigException - * @throws MissingDatasourceFileException + * @throws MissingDatasourceException */ public static function getDataSource($name) { if (empty(self::$_init)) { @@ -141,7 +141,7 @@ class ConnectionManager { * or an array containing the filename (without extension) and class name of the object, * to be found in app/Model/Datasource/ or lib/Cake/Model/Datasource/. * @return boolean True on success, null on failure or false if the class is already loaded - * @throws MissingDatasourceFileException + * @throws MissingDatasourceException */ public static function loadDataSource($connName) { if (empty(self::$_init)) { @@ -168,7 +168,10 @@ class ConnectionManager { App::uses($conn['classname'], $plugin . 'Model/Datasource' . $package); if (!class_exists($conn['classname'])) { - throw new MissingDatasourceFileException(array('class' => $conn['classname'], 'plugin' => $plugin)); + throw new MissingDatasourceException(array( + 'class' => $conn['classname'], + 'plugin' => substr($plugin, 0, -1) + )); } return true; } diff --git a/lib/Cake/Routing/Dispatcher.php b/lib/Cake/Routing/Dispatcher.php index 58f093691..5875406ec 100644 --- a/lib/Cake/Routing/Dispatcher.php +++ b/lib/Cake/Routing/Dispatcher.php @@ -81,7 +81,8 @@ class Dispatcher { if (!($controller instanceof Controller)) { throw new MissingControllerException(array( - 'controller' => Inflector::camelize($request->params['controller']) . 'Controller' + 'class' => Inflector::camelize($request->params['controller']) . 'Controller', + 'plugin' => empty($request->params['plugin']) ? null : Inflector::camelize($request->params['plugin']) )); } diff --git a/lib/Cake/Test/Case/Console/TaskCollectionTest.php b/lib/Cake/Test/Case/Console/TaskCollectionTest.php index 89edbe914..75b7908ee 100644 --- a/lib/Cake/Test/Case/Console/TaskCollectionTest.php +++ b/lib/Cake/Test/Case/Console/TaskCollectionTest.php @@ -70,12 +70,12 @@ class TaskCollectionTest extends CakeTestCase { $this->assertFalse($this->Tasks->enabled('DbConfig'), 'DbConfigTask should be disabled'); } /** - * test missinghelper exception + * test missingtask exception * - * @expectedException MissingTaskClassException + * @expectedException MissingTaskException * @return void */ - public function testLoadMissingTaskFile() { + public function testLoadMissingTask() { $result = $this->Tasks->load('ThisTaskShouldAlwaysBeMissing'); } diff --git a/lib/Cake/Test/Case/Controller/ComponentCollectionTest.php b/lib/Cake/Test/Case/Controller/ComponentCollectionTest.php index ba850d39f..960532ee3 100644 --- a/lib/Cake/Test/Case/Controller/ComponentCollectionTest.php +++ b/lib/Cake/Test/Case/Controller/ComponentCollectionTest.php @@ -111,10 +111,10 @@ class ComponentCollectionTest extends CakeTestCase { /** * test missingcomponent exception * - * @expectedException MissingComponentClassException + * @expectedException MissingComponentException * @return void */ - public function testLoadMissingComponentFile() { + public function testLoadMissingComponent() { $this->Components->load('ThisComponentShouldAlwaysBeMissing'); } diff --git a/lib/Cake/Test/Case/Error/ExceptionRendererTest.php b/lib/Cake/Test/Case/Error/ExceptionRendererTest.php index bbdab7675..c45a07b56 100644 --- a/lib/Cake/Test/Case/Error/ExceptionRendererTest.php +++ b/lib/Cake/Test/Case/Error/ExceptionRendererTest.php @@ -423,7 +423,7 @@ class ExceptionRendererTest extends CakeTestCase { * @return void */ public function testMissingController() { - $exception = new MissingControllerException(array('controller' => 'PostsController')); + $exception = new MissingControllerException(array('class' => 'PostsController')); $ExceptionRenderer = $this->_mockResponse(new ExceptionRenderer($exception)); ob_start(); @@ -505,62 +505,37 @@ class ExceptionRendererTest extends CakeTestCase { 500 ), array( - new MissingDatasourceFileException(array('class' => 'MyDatasource', 'plugin' => 'MyPlugin')), + new MissingDatasourceException(array('class' => 'MyDatasource', 'plugin' => 'MyPlugin')), array( - '/
: - %s
can not be found or does not exist.', $class); ?> + ' . $pluginDot . $class . '+
: - + ' . $class . '
', (empty($plugin) ? APP_DIR . DS : CakePlugin::path($plugin)) . 'Model' . DS . 'Behavior' . DS . $class . '.php'); ?><?php -class extends ModelBehavior { +class extends ModelBehavior { }
: - +
element('exception_stack_trace'); ?> diff --git a/lib/Cake/View/Errors/missing_behavior_file.ctp b/lib/Cake/View/Errors/missing_behavior_file.ctp deleted file mode 100644 index 8a02602c7..000000000 --- a/lib/Cake/View/Errors/missing_behavior_file.ctp +++ /dev/null @@ -1,39 +0,0 @@ - - -- : - -
-- : - -
--<?php -class extends ModelBehavior { - -} --
- : - -
- -element('exception_stack_trace'); ?> diff --git a/lib/Cake/View/Errors/missing_component_file.ctp b/lib/Cake/View/Errors/missing_component.ctp similarity index 65% rename from lib/Cake/View/Errors/missing_component_file.ctp rename to lib/Cake/View/Errors/missing_component.ctp index b67254a6d..027065e00 100644 --- a/lib/Cake/View/Errors/missing_component_file.ctp +++ b/lib/Cake/View/Errors/missing_component.ctp @@ -11,29 +11,30 @@ * * @copyright Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link http://cakephp.org CakePHP(tm) Project - * @package cake.libs.view.templates.errors + * @package Cake.View.Errors * @since CakePHP(tm) v 0.10.0.1076 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ +$pluginDot = empty($plugin) ? null : $plugin . '.'; ?> - +: - + ' . $pluginDot . $class . '
'); ?>: - ' . $class . '
', APP_DIR . DS . 'Controller' . DS . 'Component' . DS . Inflector::camelize($file)); ?> + ' . $class . '<?php -class extends Component {
+class extends Component { }
: - +
element('exception_stack_trace'); ?> diff --git a/lib/Cake/View/Errors/missing_connection.ctp b/lib/Cake/View/Errors/missing_connection.ctp index c9d21af13..515467d5c 100644 --- a/lib/Cake/View/Errors/missing_connection.ctp +++ b/lib/Cake/View/Errors/missing_connection.ctp @@ -11,7 +11,7 @@ * * @copyright Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link http://cakephp.org CakePHP(tm) Project - * @package cake.libs.view.templates.errors + * @package Cake.View.Errors * @since CakePHP(tm) v 0.10.0.1076 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ diff --git a/lib/Cake/View/Errors/missing_controller.ctp b/lib/Cake/View/Errors/missing_controller.ctp index e695d5fd8..9266ec522 100644 --- a/lib/Cake/View/Errors/missing_controller.ctp +++ b/lib/Cake/View/Errors/missing_controller.ctp @@ -11,23 +11,24 @@ * * @copyright Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link http://cakephp.org CakePHP(tm) Project - * @package cake.libs.view.templates.errors + * @package Cake.View.Errors * @since CakePHP(tm) v 0.10.0.1076 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ +$pluginDot = empty($plugin) ? null : $plugin . '.'; ?>: - ' . $controller . '
'); ?> + ' . $pluginDot . $class . ''); ?>: - ' . $controller . '
', APP_DIR . DS . 'Controller' . DS . $controller . '.php'); ?> + ' . $class . '<?php -class extends AppController { +class extends AppController { }diff --git a/lib/Cake/View/Errors/missing_database.ctp b/lib/Cake/View/Errors/missing_database.ctp index 48b44ad5a..6d02ec070 100644 --- a/lib/Cake/View/Errors/missing_database.ctp +++ b/lib/Cake/View/Errors/missing_database.ctp @@ -11,7 +11,7 @@ * * @copyright Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link http://cakephp.org CakePHP(tm) Project - * @package cake.libs.view.templates.errors + * @package Cake.View.Errors * @since CakePHP(tm) v 0.10.0.1076 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ @@ -27,7 +27,7 @@
: - +
element('exception_stack_trace'); ?> diff --git a/lib/Cake/View/Errors/missing_datasource_file.ctp b/lib/Cake/View/Errors/missing_datasource.ctp similarity index 75% rename from lib/Cake/View/Errors/missing_datasource_file.ctp rename to lib/Cake/View/Errors/missing_datasource.ctp index b358c0e7d..a9dd200fd 100644 --- a/lib/Cake/View/Errors/missing_datasource_file.ctp +++ b/lib/Cake/View/Errors/missing_datasource.ctp @@ -11,19 +11,20 @@ * * @copyright Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link http://cakephp.org CakePHP(tm) Project - * @package cake.libs.view.templates.errors + * @package Cake.View.Errors * @since CakePHP(tm) v 2.0 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ +$pluginDot = empty($plugin) ? null : $plugin . '.'; ?> - +: - ' . $class . ''); ?> + ' . $pluginDot . $class . ''); ?>
: - +
element('exception_stack_trace'); ?> diff --git a/lib/Cake/View/Errors/missing_datasource_config.ctp b/lib/Cake/View/Errors/missing_datasource_config.ctp index d1996b1d5..2d030a434 100644 --- a/lib/Cake/View/Errors/missing_datasource_config.ctp +++ b/lib/Cake/View/Errors/missing_datasource_config.ctp @@ -11,7 +11,7 @@ * * @copyright Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link http://cakephp.org CakePHP(tm) Project - * @package cake.libs.view.templates.errors + * @package Cake.View.Errors * @since CakePHP(tm) v 2.0 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ diff --git a/lib/Cake/View/Errors/missing_component_class.ctp b/lib/Cake/View/Errors/missing_helper.ctp similarity index 66% rename from lib/Cake/View/Errors/missing_component_class.ctp rename to lib/Cake/View/Errors/missing_helper.ctp index 42d810b7b..6acfb6904 100644 --- a/lib/Cake/View/Errors/missing_component_class.ctp +++ b/lib/Cake/View/Errors/missing_helper.ctp @@ -11,29 +11,30 @@ * * @copyright Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link http://cakephp.org CakePHP(tm) Project - * @package cake.libs.view.templates.errors + * @package Cake.View.Errors * @since CakePHP(tm) v 0.10.0.1076 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ +$pluginDot = empty($plugin) ? null : $plugin . '.'; ?> - +: - ' . $class . ''); ?> + ' . $pluginDot . $class . ''); ?>
: - ' . $class . '', APP_DIR . DS . 'Controller' . DS . 'Component' . DS . Inflector::camelize($file)); ?> + ' . $class . '', (empty($plugin) ? APP_DIR . DS : CakePlugin::path($plugin)) . 'View' . DS . 'Helper' . DS . $class . '.php'); ?>
<?php -class extends Component {
+class extends AppHelper { }
: - +
element('exception_stack_trace'); ?> diff --git a/lib/Cake/View/Errors/missing_helper_class.ctp b/lib/Cake/View/Errors/missing_helper_class.ctp deleted file mode 100644 index 91ec2c66a..000000000 --- a/lib/Cake/View/Errors/missing_helper_class.ctp +++ /dev/null @@ -1,39 +0,0 @@ - - -- : - %s can not be found or does not exist.', $class); ?> -
-- : - -
--<?php -class extends AppHelper { - -} --
- : - -
- -element('exception_stack_trace'); ?> diff --git a/lib/Cake/View/Errors/missing_helper_file.ctp b/lib/Cake/View/Errors/missing_helper_file.ctp deleted file mode 100644 index 9b3909a90..000000000 --- a/lib/Cake/View/Errors/missing_helper_file.ctp +++ /dev/null @@ -1,39 +0,0 @@ - - -- : - -
-- : - -
--<?php -class extends AppHelper { - -} --
- : - -
- -element('exception_stack_trace'); ?> diff --git a/lib/Cake/View/Errors/missing_layout.ctp b/lib/Cake/View/Errors/missing_layout.ctp index 79937dc06..8a50456b9 100644 --- a/lib/Cake/View/Errors/missing_layout.ctp +++ b/lib/Cake/View/Errors/missing_layout.ctp @@ -11,7 +11,7 @@ * * @copyright Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link http://cakephp.org CakePHP(tm) Project - * @package cake.libs.view.templates.errors + * @package Cake.View.Errors * @since CakePHP(tm) v 0.10.0.1076 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ diff --git a/lib/Cake/View/Errors/missing_plugin.ctp b/lib/Cake/View/Errors/missing_plugin.ctp index 1f3bea69a..710b388bd 100644 --- a/lib/Cake/View/Errors/missing_plugin.ctp +++ b/lib/Cake/View/Errors/missing_plugin.ctp @@ -11,7 +11,7 @@ * * @copyright Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link http://cakephp.org CakePHP(tm) Project - * @package cake.libs.view.templates.errors + * @package Cake.View.Errors * @since CakePHP(tm) v 2.0 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ diff --git a/lib/Cake/View/Errors/missing_table.ctp b/lib/Cake/View/Errors/missing_table.ctp index 780cea322..2190ec54a 100644 --- a/lib/Cake/View/Errors/missing_table.ctp +++ b/lib/Cake/View/Errors/missing_table.ctp @@ -11,7 +11,7 @@ * * @copyright Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link http://cakephp.org CakePHP(tm) Project - * @package cake.libs.view.templates.errors + * @package Cake.View.Errors * @since CakePHP(tm) v 0.10.0.1076 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ diff --git a/lib/Cake/View/Errors/missing_view.ctp b/lib/Cake/View/Errors/missing_view.ctp index f912277d5..65aceebca 100644 --- a/lib/Cake/View/Errors/missing_view.ctp +++ b/lib/Cake/View/Errors/missing_view.ctp @@ -11,7 +11,7 @@ * * @copyright Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link http://cakephp.org CakePHP(tm) Project - * @package cake.libs.view.templates.errors + * @package Cake.View.Errors * @since CakePHP(tm) v 0.10.0.1076 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ diff --git a/lib/Cake/View/Errors/pdo_error.ctp b/lib/Cake/View/Errors/pdo_error.ctp index f977b45fe..34d438ed2 100644 --- a/lib/Cake/View/Errors/pdo_error.ctp +++ b/lib/Cake/View/Errors/pdo_error.ctp @@ -11,7 +11,7 @@ * * @copyright Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link http://cakephp.org CakePHP(tm) Project - * @package cake.libs.view.templates.errors + * @package Cake.View.Errors * @since CakePHP(tm) v 0.10.0.1076 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ diff --git a/lib/Cake/View/Errors/private_action.ctp b/lib/Cake/View/Errors/private_action.ctp index 25213303f..294ba0641 100644 --- a/lib/Cake/View/Errors/private_action.ctp +++ b/lib/Cake/View/Errors/private_action.ctp @@ -11,7 +11,7 @@ * * @copyright Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link http://cakephp.org CakePHP(tm) Project - * @package cake.libs.view.templates.errors + * @package Cake.View.Errors * @since CakePHP(tm) v 0.10.0.1076 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ diff --git a/lib/Cake/View/Errors/scaffold_error.ctp b/lib/Cake/View/Errors/scaffold_error.ctp index f934ad798..045586e16 100644 --- a/lib/Cake/View/Errors/scaffold_error.ctp +++ b/lib/Cake/View/Errors/scaffold_error.ctp @@ -11,7 +11,7 @@ * * @copyright Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link http://cakephp.org CakePHP(tm) Project - * @package cake.libs.view.templates.errors + * @package Cake.View.Errors * @since CakePHP(tm) v 0.10.0.1076 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ diff --git a/lib/Cake/View/Helper/TimeHelper.php b/lib/Cake/View/Helper/TimeHelper.php index 25a0bc501..7e1620d8e 100644 --- a/lib/Cake/View/Helper/TimeHelper.php +++ b/lib/Cake/View/Helper/TimeHelper.php @@ -196,7 +196,7 @@ class TimeHelper extends AppHelper { * @param string $dateString Datetime string * @param integer $userOffset User's offset from GMT (in hours) * @return string Parsed timestamp - * @link http://book.cakephp.org/2.0/en/core-libraries/helpers/time.html#formattingview/1471/Formatting + * @link http://book.cakephp.org/2.0/en/core-libraries/helpers/time.html#formatting */ public function fromString($dateString, $userOffset = null) { if (empty($dateString)) { @@ -226,7 +226,7 @@ class TimeHelper extends AppHelper { * @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/2.0/en/core-libraries/helpers/time.html#formattingview/1471/Formatting + * @link http://book.cakephp.org/2.0/en/core-libraries/helpers/time.html#formatting */ public function nice($dateString = null, $userOffset = null, $format = null) { if ($dateString != null) { @@ -252,7 +252,7 @@ class TimeHelper extends AppHelper { * @param string $dateString Datetime string or Unix timestamp * @param integer $userOffset User's offset from GMT (in hours) * @return string Described, relative date string - * @link http://book.cakephp.org/2.0/en/core-libraries/helpers/time.html#formattingview/1471/Formatting + * @link http://book.cakephp.org/2.0/en/core-libraries/helpers/time.html#formatting */ public function niceShort($dateString = null, $userOffset = null) { $date = $dateString ? $this->fromString($dateString, $userOffset) : time(); @@ -279,7 +279,7 @@ class TimeHelper extends AppHelper { * @param string $fieldName Name of database field to compare with * @param integer $userOffset User's offset from GMT (in hours) * @return string Partial SQL string. - * @link http://book.cakephp.org/2.0/en/core-libraries/helpers/time.html#formattingview/1471/Formatting + * @link http://book.cakephp.org/2.0/en/core-libraries/helpers/time.html#formatting */ public function daysAsSql($begin, $end, $fieldName, $userOffset = null) { $begin = $this->fromString($begin, $userOffset); @@ -298,7 +298,7 @@ class TimeHelper extends AppHelper { * @param string $fieldName Name of database field to compare with * @param integer $userOffset User's offset from GMT (in hours) * @return string Partial SQL string. - * @link http://book.cakephp.org/2.0/en/core-libraries/helpers/time.html#formattingview/1471/Formatting + * @link http://book.cakephp.org/2.0/en/core-libraries/helpers/time.html#formatting */ public function dayAsSql($dateString, $fieldName, $userOffset = null) { $date = $this->fromString($dateString, $userOffset); @@ -323,7 +323,7 @@ class TimeHelper extends AppHelper { * @param string $dateString * @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/2.0/en/core-libraries/helpers/time.html#testing-timeview/1472/Testing-Time + * @link http://book.cakephp.org/2.0/en/core-libraries/helpers/time.html#testing-time */ public function isThisWeek($dateString, $userOffset = null) { $date = $this->fromString($dateString, $userOffset); @@ -335,7 +335,7 @@ class TimeHelper extends AppHelper { * @param string $dateString * @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/2.0/en/core-libraries/helpers/time.html#testing-timeview/1472/Testing-Time + * @link http://book.cakephp.org/2.0/en/core-libraries/helpers/time.html#testing-time */ public function isThisMonth($dateString, $userOffset = null) { $date = $this->fromString($dateString); @@ -348,7 +348,7 @@ class TimeHelper extends AppHelper { * @param string $dateString Datetime string or Unix timestamp * @param integer $userOffset User's offset from GMT (in hours) * @return boolean True if datetime string is within current year - * @link http://book.cakephp.org/2.0/en/core-libraries/helpers/time.html#testing-timeview/1472/Testing-Time + * @link http://book.cakephp.org/2.0/en/core-libraries/helpers/time.html#testing-time */ public function isThisYear($dateString, $userOffset = null) { $date = $this->fromString($dateString, $userOffset); @@ -361,7 +361,7 @@ class TimeHelper extends AppHelper { * @param string $dateString Datetime string or Unix timestamp * @param integer $userOffset User's offset from GMT (in hours) * @return boolean True if datetime string was yesterday - * @link http://book.cakephp.org/2.0/en/core-libraries/helpers/time.html#testing-timeview/1472/Testing-Time + * @link http://book.cakephp.org/2.0/en/core-libraries/helpers/time.html#testing-time * */ public function wasYesterday($dateString, $userOffset = null) { @@ -375,7 +375,7 @@ class TimeHelper extends AppHelper { * @param string $dateString Datetime string or Unix timestamp * @param integer $userOffset User's offset from GMT (in hours) * @return boolean True if datetime string was yesterday - * @link http://book.cakephp.org/2.0/en/core-libraries/helpers/time.html#testing-timeview/1472/Testing-Time + * @link http://book.cakephp.org/2.0/en/core-libraries/helpers/time.html#testing-time */ public function isTomorrow($dateString, $userOffset = null) { $date = $this->fromString($dateString, $userOffset); @@ -388,7 +388,7 @@ class TimeHelper extends AppHelper { * @param string $dateString * @param boolean $range if true returns a range in Y-m-d format * @return boolean True if datetime string is within current week - * @link http://book.cakephp.org/2.0/en/core-libraries/helpers/time.html#formattingview/1471/Formatting + * @link http://book.cakephp.org/2.0/en/core-libraries/helpers/time.html#formatting */ public function toQuarter($dateString, $range = false) { $time = $this->fromString($dateString); @@ -425,7 +425,7 @@ class TimeHelper extends AppHelper { * @param string $dateString Datetime string to be represented as a Unix timestamp * @param integer $userOffset User's offset from GMT (in hours) * @return integer Unix timestamp - * @link http://book.cakephp.org/2.0/en/core-libraries/helpers/time.html#formattingview/1471/Formatting + * @link http://book.cakephp.org/2.0/en/core-libraries/helpers/time.html#formatting */ public function toUnix($dateString, $userOffset = null) { return $this->fromString($dateString, $userOffset); @@ -437,7 +437,7 @@ class TimeHelper extends AppHelper { * @param string $dateString Datetime string or Unix timestamp * @param integer $userOffset User's offset from GMT (in hours) * @return string Formatted date string - * @link http://book.cakephp.org/2.0/en/core-libraries/helpers/time.html#formattingview/1471/Formatting + * @link http://book.cakephp.org/2.0/en/core-libraries/helpers/time.html#formatting */ public function toAtom($dateString, $userOffset = null) { $date = $this->fromString($dateString, $userOffset); @@ -450,7 +450,7 @@ class TimeHelper extends AppHelper { * @param string $dateString Datetime string or Unix timestamp * @param integer $userOffset User's offset from GMT (in hours) * @return string Formatted date string - * @link http://book.cakephp.org/2.0/en/core-libraries/helpers/time.html#formattingview/1471/Formatting + * @link http://book.cakephp.org/2.0/en/core-libraries/helpers/time.html#formatting */ public function toRSS($dateString, $userOffset = null) { $date = $this->fromString($dateString, $userOffset); @@ -491,7 +491,7 @@ class TimeHelper extends AppHelper { * @param string $dateTime Datetime string or Unix timestamp * @param array $options Default format if timestamp is used in $dateString * @return string Relative time string. - * @link http://book.cakephp.org/2.0/en/core-libraries/helpers/time.html#formattingview/1471/Formatting + * @link http://book.cakephp.org/2.0/en/core-libraries/helpers/time.html#formatting */ public function timeAgoInWords($dateTime, $options = array()) { $userOffset = null; @@ -657,7 +657,7 @@ class TimeHelper extends AppHelper { * @param mixed $dateString the datestring or unix timestamp to compare * @param integer $userOffset User's offset from GMT (in hours) * @return boolean - * @link http://book.cakephp.org/2.0/en/core-libraries/helpers/time.html#testing-timeview/1472/Testing-Time + * @link http://book.cakephp.org/2.0/en/core-libraries/helpers/time.html#testing-time */ public function wasWithinLast($timeInterval, $dateString, $userOffset = null) { $tmp = str_replace(' ', '', $timeInterval); @@ -680,7 +680,7 @@ class TimeHelper extends AppHelper { * * @param string $string Datetime string * @return string Formatted date string - * @link http://book.cakephp.org/2.0/en/core-libraries/helpers/time.html#formattingview/1471/Formatting + * @link http://book.cakephp.org/2.0/en/core-libraries/helpers/time.html#formatting */ public function gmt($string = null) { if ($string != null) { diff --git a/lib/Cake/View/HelperCollection.php b/lib/Cake/View/HelperCollection.php index 9aceb9f35..fb1b55260 100644 --- a/lib/Cake/View/HelperCollection.php +++ b/lib/Cake/View/HelperCollection.php @@ -55,7 +55,7 @@ class HelperCollection extends ObjectCollection { * @param string $helper Helper name to load * @param array $settings Settings for the helper. * @return Helper A helper object, Either the existing loaded helper or a new one. - * @throws MissingHelperFileException, MissingHelperClassException when the helper could not be found + * @throws MissingHelperException when the helper could not be found */ public function load($helper, $settings = array()) { if (is_array($settings) && isset($settings['className'])) { @@ -73,9 +73,9 @@ class HelperCollection extends ObjectCollection { $helperClass = $name . 'Helper'; App::uses($helperClass, $plugin . 'View/Helper'); if (!class_exists($helperClass)) { - throw new MissingHelperClassException(array( + throw new MissingHelperException(array( 'class' => $helperClass, - 'file' => $helperClass . '.php' + 'plugin' => substr($plugin, 0, -1) )); } $this->_loaded[$alias] = new $helperClass($this->_View, $settings); diff --git a/lib/Cake/View/Layouts/Emails/html/default.ctp b/lib/Cake/View/Layouts/Emails/html/default.ctp index 790a86e06..a01f6824c 100644 --- a/lib/Cake/View/Layouts/Emails/html/default.ctp +++ b/lib/Cake/View/Layouts/Emails/html/default.ctp @@ -11,7 +11,7 @@ * * @copyright Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link http://cakephp.org CakePHP(tm) Project - * @package cake.libs.view.templates.layouts.email.html + * @package Cake.View.Layouts.Emails.html * @since CakePHP(tm) v 0.10.0.1076 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ diff --git a/lib/Cake/View/Layouts/Emails/text/default.ctp b/lib/Cake/View/Layouts/Emails/text/default.ctp index 1f2bc480d..7cb5fe5e8 100644 --- a/lib/Cake/View/Layouts/Emails/text/default.ctp +++ b/lib/Cake/View/Layouts/Emails/text/default.ctp @@ -11,7 +11,7 @@ * * @copyright Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link http://cakephp.org CakePHP(tm) Project - * @package cake.libs.view.templates.layouts.email.text + * @package Cake.View.Layouts.Emails.text * @since CakePHP(tm) v 0.10.0.1076 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ diff --git a/lib/Cake/View/Layouts/ajax.ctp b/lib/Cake/View/Layouts/ajax.ctp index 177bee8d3..e878d0b72 100644 --- a/lib/Cake/View/Layouts/ajax.ctp +++ b/lib/Cake/View/Layouts/ajax.ctp @@ -11,7 +11,7 @@ * * @copyright Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link http://cakephp.org CakePHP(tm) Project - * @package cake.libs.view.templates.layouts + * @package Cake.View.Layouts * @since CakePHP(tm) v 0.10.0.1076 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ diff --git a/lib/Cake/View/Layouts/default.ctp b/lib/Cake/View/Layouts/default.ctp index 4dbd80859..5bf91f225 100644 --- a/lib/Cake/View/Layouts/default.ctp +++ b/lib/Cake/View/Layouts/default.ctp @@ -11,7 +11,7 @@ * * @copyright Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link http://cakephp.org CakePHP(tm) Project - * @package cake.libs.view.templates.layouts + * @package Cake.View.Layouts * @since CakePHP(tm) v 0.10.0.1076 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ diff --git a/lib/Cake/View/Layouts/flash.ctp b/lib/Cake/View/Layouts/flash.ctp index c49b62a72..a6fd50258 100644 --- a/lib/Cake/View/Layouts/flash.ctp +++ b/lib/Cake/View/Layouts/flash.ctp @@ -11,7 +11,7 @@ * * @copyright Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link http://cakephp.org CakePHP(tm) Project - * @package cake.libs.view.templates.layouts + * @package Cake.View.Layouts * @since CakePHP(tm) v 0.10.0.1076 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ diff --git a/lib/Cake/View/Pages/home.ctp b/lib/Cake/View/Pages/home.ctp index 09532dcf5..d6737469d 100644 --- a/lib/Cake/View/Pages/home.ctp +++ b/lib/Cake/View/Pages/home.ctp @@ -11,7 +11,7 @@ * * @copyright Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link http://cakephp.org CakePHP(tm) Project - * @package cake.libs.view.templates.pages + * @package Cake.View.Pages * @since CakePHP(tm) v 0.10.0.1076 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ diff --git a/lib/Cake/View/Scaffolds/form.ctp b/lib/Cake/View/Scaffolds/form.ctp index 4341ef8fd..379ff6f19 100644 --- a/lib/Cake/View/Scaffolds/form.ctp +++ b/lib/Cake/View/Scaffolds/form.ctp @@ -11,7 +11,7 @@ * * @copyright Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link http://cakephp.org CakePHP(tm) Project - * @package cake.libs.view.templates.scaffolds + * @package Cake.View.Scaffolds * @since CakePHP(tm) v 0.10.0.1076 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ diff --git a/lib/Cake/View/Scaffolds/index.ctp b/lib/Cake/View/Scaffolds/index.ctp index 31d850752..0b5434004 100644 --- a/lib/Cake/View/Scaffolds/index.ctp +++ b/lib/Cake/View/Scaffolds/index.ctp @@ -11,7 +11,7 @@ * * @copyright Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link http://cakephp.org CakePHP(tm) Project - * @package cake.console.libs.templates.views + * @package Cake.View.Scaffolds * @since CakePHP(tm) v 0.10.0.1076 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ diff --git a/lib/Cake/View/Scaffolds/view.ctp b/lib/Cake/View/Scaffolds/view.ctp index d18e70661..9e36fffd4 100644 --- a/lib/Cake/View/Scaffolds/view.ctp +++ b/lib/Cake/View/Scaffolds/view.ctp @@ -11,7 +11,7 @@ * * @copyright Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link http://cakephp.org CakePHP(tm) Project - * @package cake.libs.view.templates.scaffolds + * @package Cake.View.Scaffolds * @since CakePHP(tm) v 0.10.0.1076 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ diff --git a/lib/Cake/basics.php b/lib/Cake/basics.php index 1e853155b..92a322685 100644 --- a/lib/Cake/basics.php +++ b/lib/Cake/basics.php @@ -152,7 +152,7 @@ if (!function_exists('sortByKey')) { * @param boolean $double Encode existing html entities * @param string $charset Character set to use when escaping. Defaults to config value in 'App.encoding' or 'UTF-8' * @return string Wrapped text - * @link http://book.cakephp.org/2.0/en/development/debugging.html#h + * @link http://book.cakephp.org/2.0/en/core-libraries/global-constants-and-functions.html#h */ function h($text, $double = true, $charset = null) { if (is_array($text)) { @@ -204,7 +204,7 @@ function pluginSplit($name, $dotAppend = false, $plugin = null) { * * @see debug() * @param array $var Variable to print out - * @link http://book.cakephp.org/2.0/en/development/debugging.html#pr + * @link http://book.cakephp.org/2.0/en/core-libraries/global-constants-and-functions.html#pr */ function pr($var) { if (Configure::read('debug') > 0) { @@ -244,7 +244,7 @@ function am() { * * @param string $key Environment variable name. * @return string Environment variable setting. - * @link http://book.cakephp.org/2.0/en/development/debugging.html#env + * @link http://book.cakephp.org/2.0/en/core-libraries/global-constants-and-functions.html#env */ function env($key) { if ($key === 'HTTPS') { @@ -464,7 +464,7 @@ function clearCache($params = null, $type = 'views', $ext = '.php') { * * @param array $values Array of values to strip slashes * @return mixed What is returned from calling stripslashes - * @link http://book.cakephp.org/2.0/en/development/debugging.html#stripslashes_deep + * @link http://book.cakephp.org/2.0/en/core-libraries/global-constants-and-functions.html#stripslashes_deep */ function stripslashes_deep($values) { if (is_array($values)) { @@ -483,7 +483,7 @@ function stripslashes_deep($values) { * @param string $singular Text to translate * @param mixed $args Array with arguments or multiple arguments in function * @return mixed translated string - * @link http://book.cakephp.org/2.0/en/development/debugging.html#__ + * @link http://book.cakephp.org/2.0/en/core-libraries/global-constants-and-functions.html#__ */ function __($singular, $args = null) { if (!$singular) { @@ -701,7 +701,7 @@ function LogError($message) { * * @param string $file File to look for * @return Full path to file if exists, otherwise false - * @link http://book.cakephp.org/2.0/en/development/debugging.html#fileExistsInPath + * @link http://book.cakephp.org/2.0/en/core-libraries/global-constants-and-functions.html#fileExistsInPath */ function fileExistsInPath($file) { $paths = explode(PATH_SEPARATOR, ini_get('include_path')); @@ -722,7 +722,7 @@ function fileExistsInPath($file) { * * @param string String to convert * @return string with underscore remove from start and end of string - * @link http://book.cakephp.org/2.0/en/development/debugging.html#convertSlash + * @link http://book.cakephp.org/2.0/en/core-libraries/global-constants-and-functions.html#convertSlash */ function convertSlash($string) { $string = trim($string, '/');