Skip to content
Permalink
Browse files

Updated View folder

  • Loading branch information...
jrbasso committed May 25, 2012
1 parent 1f64938 commit 6accc5420a551d0c732f470628b5f70d964bffd5
Showing with 247 additions and 178 deletions.
  1. +1 −1 lib/Cake/View/Elements/exception_stack_trace.ctp
  2. +3 −1 lib/Cake/View/Errors/missing_behavior.ctp
  3. +3 −1 lib/Cake/View/Errors/missing_component.ctp
  4. +3 −1 lib/Cake/View/Errors/missing_controller.ctp
  5. +3 −1 lib/Cake/View/Errors/missing_helper.ctp
  6. +2 −2 lib/Cake/View/Errors/missing_plugin.ctp
  7. +1 −0 lib/Cake/View/Errors/missing_view.ctp
  8. +1 −0 lib/Cake/View/Errors/pdo_error.ctp
  9. +14 −5 lib/Cake/View/Helper.php
  10. +6 −4 lib/Cake/View/Helper/CacheHelper.php
  11. +13 −6 lib/Cake/View/Helper/FormHelper.php
  12. +15 −10 lib/Cake/View/Helper/HtmlHelper.php
  13. +1 −3 lib/Cake/View/Helper/JqueryEngineHelper.php
  14. +4 −3 lib/Cake/View/Helper/JsBaseEngineHelper.php
  15. +4 −4 lib/Cake/View/Helper/JsHelper.php
  16. +1 −2 lib/Cake/View/Helper/MootoolsEngineHelper.php
  17. +11 −8 lib/Cake/View/Helper/NumberHelper.php
  18. +12 −8 lib/Cake/View/Helper/PaginatorHelper.php
  19. +1 −2 lib/Cake/View/Helper/PrototypeEngineHelper.php
  20. +4 −3 lib/Cake/View/Helper/RssHelper.php
  21. +11 −11 lib/Cake/View/Helper/SessionHelper.php
  22. +11 −8 lib/Cake/View/Helper/TextHelper.php
  23. +13 −9 lib/Cake/View/Helper/TimeHelper.php
  24. +26 −25 lib/Cake/View/HelperCollection.php
  25. +4 −3 lib/Cake/View/JsonView.php
  26. +7 −6 lib/Cake/View/MediaView.php
  27. +5 −3 lib/Cake/View/ScaffoldView.php
  28. +2 −0 lib/Cake/View/Scaffolds/form.ctp
  29. +3 −0 lib/Cake/View/Scaffolds/index.ctp
  30. +4 −0 lib/Cake/View/Scaffolds/view.ctp
  31. +1 −2 lib/Cake/View/ThemeView.php
  32. +45 −38 lib/Cake/View/View.php
  33. +7 −4 lib/Cake/View/ViewBlock.php
  34. +5 −4 lib/Cake/View/XmlView.php
@@ -16,7 +16,7 @@
* @since CakePHP(tm) v 1.3
* @license MIT License (http://www.opensource.org/licenses/mit-license.php)
*/
App::uses('Debugger', 'Utility');
use Cake\Utility\Debugger;
?>
<h3>Stack Trace</h3>
<ul class="cake-stack-trace">
@@ -15,6 +15,8 @@
* @since CakePHP(tm) v 1.3
* @license MIT License (http://www.opensource.org/licenses/mit-license.php)
*/
use Cake\Core\Plugin;
$pluginDot = empty($plugin) ? null : $plugin . '.';
?>
<h2><?php echo __d('cake_dev', 'Missing Behavior'); ?></h2>
@@ -24,7 +26,7 @@ $pluginDot = empty($plugin) ? null : $plugin . '.';
</p>
<p class="error">
<strong><?php echo __d('cake_dev', 'Error'); ?>: </strong>
<?php echo __d('cake_dev', 'Create the class %s below in file: %s', '<em>' . $class . '</em>', (empty($plugin) ? APP_DIR . DS : CakePlugin::path($plugin)) . 'Model' . DS . 'Behavior' . DS . $class . '.php'); ?>
<?php echo __d('cake_dev', 'Create the class %s below in file: %s', '<em>' . $class . '</em>', (empty($plugin) ? APP_DIR . DS : Plugin::path($plugin)) . 'Model' . DS . 'Behavior' . DS . $class . '.php'); ?>
</p>
<pre>
&lt;?php
@@ -15,6 +15,8 @@
* @since CakePHP(tm) v 0.10.0.1076
* @license MIT License (http://www.opensource.org/licenses/mit-license.php)
*/
use Cake\Core\Plugin;
$pluginDot = empty($plugin) ? null : $plugin . '.';
?>
<h2><?php echo __d('cake_dev', 'Missing Component'); ?></h2>
@@ -24,7 +26,7 @@ $pluginDot = empty($plugin) ? null : $plugin . '.';
</p>
<p class="error">
<strong><?php echo __d('cake_dev', 'Error'); ?>: </strong>
<?php echo __d('cake_dev', 'Create the class %s below in file: %s', '<em>' . $class . '</em>', (empty($plugin) ? APP_DIR . DS : CakePlugin::path($plugin)) . 'Controller' . DS . 'Component' . DS . $class . '.php'); ?>
<?php echo __d('cake_dev', 'Create the class %s below in file: %s', '<em>' . $class . '</em>', (empty($plugin) ? APP_DIR . DS : Plugin::path($plugin)) . 'Controller' . DS . 'Component' . DS . $class . '.php'); ?>
</p>
<pre>
&lt;?php
@@ -15,6 +15,8 @@
* @since CakePHP(tm) v 0.10.0.1076
* @license MIT License (http://www.opensource.org/licenses/mit-license.php)
*/
use Cake\Core\Plugin;
$pluginDot = empty($plugin) ? null : $plugin . '.';
?>
<h2><?php echo __d('cake_dev', 'Missing Controller'); ?></h2>
@@ -24,7 +26,7 @@ $pluginDot = empty($plugin) ? null : $plugin . '.';
</p>
<p class="error">
<strong><?php echo __d('cake_dev', 'Error'); ?>: </strong>
<?php echo __d('cake_dev', 'Create the class %s below in file: %s', '<em>' . $class . '</em>', (empty($plugin) ? APP_DIR . DS : CakePlugin::path($plugin)) . 'Controller' . DS . $class . '.php'); ?>
<?php echo __d('cake_dev', 'Create the class %s below in file: %s', '<em>' . $class . '</em>', (empty($plugin) ? APP_DIR . DS : Plugin::path($plugin)) . 'Controller' . DS . $class . '.php'); ?>
</p>
<pre>
&lt;?php
@@ -15,6 +15,8 @@
* @since CakePHP(tm) v 0.10.0.1076
* @license MIT License (http://www.opensource.org/licenses/mit-license.php)
*/
use Cake\Core\Plugin;
$pluginDot = empty($plugin) ? null : $plugin . '.';
?>
<h2><?php echo __d('cake_dev', 'Missing Helper'); ?></h2>
@@ -24,7 +26,7 @@ $pluginDot = empty($plugin) ? null : $plugin . '.';
</p>
<p class="error">
<strong><?php echo __d('cake_dev', 'Error'); ?>: </strong>
<?php echo __d('cake_dev', 'Create the class %s below in file: %s', '<em>' . $class . '</em>', (empty($plugin) ? APP_DIR . DS : CakePlugin::path($plugin)) . 'View' . DS . 'Helper' . DS . $class . '.php'); ?>
<?php echo __d('cake_dev', 'Create the class %s below in file: %s', '<em>' . $class . '</em>', (empty($plugin) ? APP_DIR . DS : Plugin::path($plugin)) . 'View' . DS . 'Helper' . DS . $class . '.php'); ?>
</p>
<pre>
&lt;?php
@@ -27,15 +27,15 @@
</p>
<pre>
&lt;?php
CakePlugin::load('<?php echo $plugin?>');
Plugin::load('<?php echo $plugin?>');

</pre>
<p class="notice">
<strong><?php echo __d('cake_dev', 'Loading all plugins'); ?>: </strong>
<?php echo __d('cake_dev', 'If you wish to load all plugins at once, use the following line in your ' . APP_DIR . DS . 'Config' . DS . 'bootstrap.php file'); ?>
</p>
<pre>
CakePlugin::loadAll();
Plugin::loadAll();
</pre>
<p class="notice">
<strong><?php echo __d('cake_dev', 'Notice'); ?>: </strong>
@@ -15,6 +15,7 @@
* @since CakePHP(tm) v 0.10.0.1076
* @license MIT License (http://www.opensource.org/licenses/mit-license.php)
*/
use Cake\Utility\Inflector;
?>
<h2><?php echo __d('cake_dev', 'Missing View'); ?></h2>
<p class="error">
@@ -15,6 +15,7 @@
* @since CakePHP(tm) v 0.10.0.1076
* @license MIT License (http://www.opensource.org/licenses/mit-license.php)
*/
use Cake\Utility\Debugger;
?>
<h2><?php echo __d('cake_dev', 'Database Error'); ?></h2>
<p class="error">
@@ -12,8 +12,17 @@
* @since CakePHP(tm) v 0.2.9
* @license MIT License (http://www.opensource.org/licenses/mit-license.php)
*/
namespace Cake\View;
App::uses('Router', 'Routing');
use Cake\Core\Object,
Cake\Core\App,
Cake\Core\Configure,
Cake\Core\Plugin,
Cake\Routing\Router,
Cake\Utility\ClassRegistry,
Cake\Utility\Inflector,
Cake\Utility\Hash,
Cake\Utility\ObjectCollection;
/**
* Abstract base class for all other Helpers in CakePHP.
@@ -47,7 +56,7 @@ class Helper extends Object {
/**
* Request object
*
* @var CakeRequest
* @var Cake\Network\Request
*/
public $request = null;
@@ -345,9 +354,9 @@ public function assetTimestamp($path) {
return $path . '?' . @filemtime($themePath);
} else {
$plugin = Inflector::camelize($segments[0]);
if (CakePlugin::loaded($plugin)) {
if (Plugin::loaded($plugin)) {
unset($segments[0]);
$pluginPath = CakePlugin::path($plugin) . 'webroot' . DS . implode(DS, $segments);
$pluginPath = Plugin::path($plugin) . 'webroot' . DS . implode(DS, $segments);
return $path . '?' . @filemtime($pluginPath);
}
}
@@ -601,7 +610,7 @@ public function domId($options = null, $id = 'id') {
$entity = $this->entity();
$model = array_shift($entity);
$dom = $model . join('', array_map(array('Inflector', 'camelize'), $entity));
$dom = $model . join('', array_map(array('Cake\Utility\Inflector', 'camelize'), $entity));
if (is_array($options) && !array_key_exists($id, $options)) {
$options[$id] = $dom;
@@ -16,8 +16,10 @@
* @since CakePHP(tm) v 1.0.0.2277
* @license MIT License (http://www.opensource.org/licenses/mit-license.php)
*/
App::uses('AppHelper', 'View/Helper');
namespace Cake\View\Helper;
use Cake\View\Helper,
Cake\Core\Configure,
Cake\Utility\Inflector;
/**
* CacheHelper helps create full page view caching.
@@ -28,7 +30,7 @@
* @package Cake.View.Helper
* @link http://book.cakephp.org/2.0/en/core-libraries/helpers/cache.html
*/
class CacheHelper extends AppHelper {
class CacheHelper extends Helper {
/**
* Array of strings replaced in cached views.
@@ -292,7 +294,7 @@ protected function _writeFile($content, $timestamp, $useCallbacks = false) {
$file .= '
$request = unserialize(base64_decode(\'' . base64_encode(serialize($this->request)) . '\'));
$response = new CakeResponse(array("charset" => Configure::read("App.encoding")));
$response = new \Cake\Network\Response(array("charset" => Configure::read("App.encoding")));
$controller = new ' . $this->_View->name . 'Controller($request, $response);
$controller->plugin = $this->plugin = \'' . $this->_View->plugin . '\';
$controller->helpers = $this->helpers = unserialize(base64_decode(\'' . base64_encode(serialize($this->_View->helpers)) . '\'));
@@ -12,9 +12,16 @@
* @since CakePHP(tm) v 0.10.0.1076
* @license MIT License (http://www.opensource.org/licenses/mit-license.php)
*/
App::uses('ClassRegistry', 'Utility');
App::uses('AppHelper', 'View/Helper');
App::uses('Hash', 'Utility');
namespace Cake\View\Helper;
use Cake\View\Helper,
Cake\View\View,
Cake\Utility\ClassRegistry,
Cake\Utility\Inflector,
Cake\Utility\Security,
Cake\Utility\Hash,
Cake\Core\Configure,
Cake\Error;
/**
* Form helper library.
@@ -25,7 +32,7 @@
* @property HtmlHelper $Html
* @link http://book.cakephp.org/2.0/en/core-libraries/helpers/form.html
*/
class FormHelper extends AppHelper {
class FormHelper extends Helper {
/**
* Other helpers used by FormHelper
@@ -1426,12 +1433,12 @@ public function radio($fieldName, $options = array(), $attributes = array()) {
* @param string $method Method name / input type to make.
* @param array $params Parameters for the method call
* @return string Formatted input method.
* @throws CakeException When there are no params for the method call.
* @throws Cake\Error\Exception When there are no params for the method call.
*/
public function __call($method, $params) {
$options = array();
if (empty($params)) {
throw new CakeException(__d('cake_dev', 'Missing field name for FormHelper::%s', $method));
throw new Error\Exception(__d('cake_dev', 'Missing field name for FormHelper::%s', $method));
}
if (isset($params[1])) {
$options = $params[1];
@@ -16,9 +16,15 @@
* @since CakePHP(tm) v 0.9.1
* @license MIT License (http://www.opensource.org/licenses/mit-license.php)
*/
namespace Cake\View\Helper;
App::uses('AppHelper', 'View/Helper');
App::uses('CakeResponse', 'Network');
use Cake\View\Helper,
Cake\View\View,
Cake\Core\App,
Cake\Core\Configure,
Cake\Network\Response,
Cake\Utility\Inflector,
Cake\Error;
/**
* Html Helper class for easy use of HTML widgets.
@@ -28,12 +34,12 @@
* @package Cake.View.Helper
* @link http://book.cakephp.org/2.0/en/core-libraries/helpers/html.html
*/
class HtmlHelper extends AppHelper {
class HtmlHelper extends Helper {
/**
* Reference to the Response object
*
* @var CakeResponse
* @var Cake\Network\Response
*/
public $response;
@@ -159,7 +165,7 @@ public function __construct(View $View, $settings = array()) {
if (is_object($this->_View->response)) {
$this->response = $this->_View->response;
} else {
$this->response = new CakeResponse(array('charset' => Configure::read('App.encoding')));
$this->response = new Response(array('charset' => Configure::read('App.encoding')));
}
if (!empty($settings['configFile'])) {
$this->loadConfig($settings['configFile']);
@@ -1176,13 +1182,12 @@ public function loadConfig($configFile, $path = null) {
$reader = $configFile[1];
}
} else {
throw new ConfigureException(__d('cake_dev', 'Cannot load the configuration file. Wrong "configFile" configuration.'));
throw new Error\ConfigureException(__d('cake_dev', 'Cannot load the configuration file. Wrong "configFile" configuration.'));
}
$readerClass = Inflector::camelize($reader) . 'Reader';
App::uses($readerClass, 'Configure');
if (!class_exists($readerClass)) {
throw new ConfigureException(__d('cake_dev', 'Cannot load the configuration file. Unknown reader.'));
$readerClass = App::classname(Inflector::camelize($reader), 'Configure', 'Reader');
if (!$readerClass) {
throw new Error\ConfigureException(__d('cake_dev', 'Cannot load the configuration file. Unknown reader.'));
}
$readerObj = new $readerClass($path);
@@ -22,9 +22,7 @@
* @since CakePHP(tm) v 1.3
* @license MIT License (http://www.opensource.org/licenses/mit-license.php)
*/
App::uses('AppHelper', 'View/Helper');
App::uses('JsBaseEngineHelper', 'View/Helper');
namespace Cake\View\Helper;
/**
* jQuery Engine Helper for JsHelper
@@ -12,8 +12,9 @@
* @since CakePHP(tm) v 2.0
* @license MIT License (http://www.opensource.org/licenses/mit-license.php)
*/
App::uses('AppHelper', 'View/Helper');
namespace Cake\View\Helper;
use Cake\View\Helper,
Cake\I18n\Multibyte;
/**
* JsEngineBaseClass
@@ -22,7 +23,7 @@
*
* @package Cake.View.Helper
*/
abstract class JsBaseEngineHelper extends AppHelper {
abstract class JsBaseEngineHelper extends Helper {
/**
* The js snippet for the current selection.
@@ -16,10 +16,10 @@
* @since CakePHP(tm) v 1.2
* @license MIT License (http://www.opensource.org/licenses/mit-license.php)
*/
namespace Cake\View\Helper;
App::uses('AppHelper', 'View/Helper');
App::uses('JsBaseEngineHelper', 'View/Helper');
App::uses('Multibyte', 'I18n');
use Cake\View\Helper,
Cake\View\View;
/**
* Javascript Generator helper class for easy use of JavaScript.
@@ -31,7 +31,7 @@
* @property HtmlHelper $Html
* @property FormHelper $Form
*/
class JsHelper extends AppHelper {
class JsHelper extends Helper {
/**
* Whether or not you want scripts to be buffered or output.
@@ -12,8 +12,7 @@
* @since CakePHP(tm) v 1.3
* @license MIT License (http://www.opensource.org/licenses/mit-license.php)
*/
App::uses('JsBaseEngineHelper', 'View/Helper');
namespace Cake\View\Helper;
/**
* MooTools Engine Helper for JsHelper
Oops, something went wrong.

0 comments on commit 6accc54

Please sign in to comment.
You can’t perform that action at this time.