Skip to content

Commit

Permalink
Clarify string type casting of view block values.
Browse files Browse the repository at this point in the history
Refs #8921
  • Loading branch information
ADmad committed Jun 1, 2016
1 parent d49cddf commit 1fbcce5
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 6 deletions.
11 changes: 7 additions & 4 deletions src/View/View.php
Expand Up @@ -707,7 +707,8 @@ public function start($name)
* Appending to a new block will create the block.
*
* @param string $name Name of the block
* @param mixed $value The content for the block.
* @param mixed $value The content for the block. Value will be type cast
* to string.
* @return void
* @see \Cake\View\ViewBlock::concat()
*/
Expand All @@ -722,7 +723,8 @@ public function append($name, $value = null)
* Prepending to a new block will create the block.
*
* @param string $name Name of the block
* @param mixed $value The content for the block.
* @param mixed $value The content for the block. Value will be type cast
* to string.
* @return void
* @see \Cake\View\ViewBlock::concat()
*/
Expand All @@ -736,7 +738,8 @@ public function prepend($name, $value)
* existing content.
*
* @param string $name Name of the block
* @param mixed $value The content for the block.
* @param mixed $value The content for the block. Value will be type cast
* to string.
* @return void
* @see \Cake\View\ViewBlock::set()
*/
Expand Down Expand Up @@ -764,7 +767,7 @@ public function reset($name)
*
* @param string $name Name of the block
* @param string $default Default text
* @return string default The block content or $default if the block does not exist.
* @return string The block content or $default if the block does not exist.
* @see \Cake\View\ViewBlock::get()
*/
public function fetch($name, $default = '')
Expand Down
6 changes: 4 additions & 2 deletions src/View/ViewBlock.php
Expand Up @@ -129,7 +129,8 @@ public function end()
* of the new capturing context will be added to the existing block context.
*
* @param string $name Name of the block
* @param mixed $value The content for the block
* @param mixed $value The content for the block. Value will be type cast
* to string.
* @param string $mode If ViewBlock::APPEND content will be appended to existing content.
* If ViewBlock::PREPEND it will be prepended.
* @return void
Expand All @@ -156,7 +157,8 @@ public function concat($name, $value = null, $mode = ViewBlock::APPEND)
* existing content.
*
* @param string $name Name of the block
* @param mixed $value The content for the block.
* @param mixed $value The content for the block. Value will be type cast
* to string.
* @return void
*/
public function set($name, $value)
Expand Down

0 comments on commit 1fbcce5

Please sign in to comment.