Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

adding magic method__isset() for overloaded properties

  • Loading branch information...
commit 929a40364f2d4ef72ff23850b297aa8205a77972 1 parent 1d333fd
@ceeram ceeram authored
Showing with 16 additions and 6 deletions.
  1. +16 −6 lib/Cake/View/View.php
View
22 lib/Cake/View/View.php
@@ -465,7 +465,7 @@ public function render($view = null, $layout = null) {
* the 'meta', 'css', and 'script' blocks. They are appended in that order.
*
* Deprecated features:
- *
+ *
* - `$scripts_for_layout` is deprecated and will be removed in CakePHP 3.0.
* Use the block features instead. `meta`, `css` and `script` will be populated
* by the matching methods on HtmlHelper.
@@ -600,7 +600,7 @@ public function start($name) {
}
/**
- * Append to an existing or new block. Appending to a new
+ * Append to an existing or new block. Appending to a new
* block will create the block.
*
* @param string $name Name of the block
@@ -650,7 +650,7 @@ public function end() {
}
/**
- * Provides view or element extension/inheritance. Views can extends a
+ * Provides view or element extension/inheritance. Views can extends a
* parent view and populate blocks in the parent template.
*
* @param string $name The view or element to 'extend' the current one with.
@@ -668,7 +668,7 @@ public function extend($name) {
case self::TYPE_LAYOUT:
$parent = $this->_getLayoutFileName($name);
break;
-
+
}
if ($parent == $this->_current) {
throw new LogicException(__d('cake_dev', 'You cannot have views extend themselves.'));
@@ -775,7 +775,7 @@ public function __get($name) {
/**
* Magic accessor for deprecated attributes.
- *
+ *
* @param string $name Name of the attribute to set.
* @param string $value Value of the attribute to set.
* @return mixed
@@ -790,6 +790,16 @@ public function __set($name, $value) {
}
/**
+ * Magic isset check for deprecated attributes.
+ *
+ * @param string $name Name of the attribute to check.
+ * @return boolean
+ */
+ public function __isset($name) {
+ return isset($this->name);
+ }
+
+/**
* Interact with the HelperCollection to load all the helpers.
*
* @return void
@@ -845,7 +855,7 @@ protected function _render($viewFile, $data = array()) {
* Sandbox method to evaluate a template / view script in.
*
* @param string $___viewFn Filename of the view
- * @param array $___dataForView Data to include in rendered view.
+ * @param array $___dataForView Data to include in rendered view.
* If empty the current View::$viewVars will be used.
* @return string Rendered output
*/
Please sign in to comment.
Something went wrong with that request. Please try again.