Permalink
Browse files

Adding and correcting doc blocks.

  • Loading branch information...
1 parent 6c51573 commit 46348e9bbd00dd967c79da1060081832552b7328 @markstory markstory committed Mar 28, 2010
Showing with 11 additions and 8 deletions.
  1. +2 −1 cake/libs/cake_socket.php
  2. +3 −3 cake/libs/string.php
  3. +5 −3 cake/libs/view/helper.php
  4. +1 −1 cake/libs/view/view.php
View
3 cake/libs/cake_socket.php
@@ -87,6 +87,7 @@ class CakeSocket extends Object {
* Constructor.
*
* @param array $config Socket configuration, which will be merged with the base configuration
+ * @see CakeSocket::$_baseConfig
*/
function __construct($config = array()) {
parent::__construct();
@@ -181,7 +182,7 @@ function addresses() {
*/
function lastError() {
if (!empty($this->lastError)) {
- return $this->lastError['num'].': '.$this->lastError['str'];
+ return $this->lastError['num'] . ': ' . $this->lastError['str'];
} else {
return null;
}
View
6 cake/libs/string.php
@@ -260,17 +260,17 @@ function insert($str, $data, $options = array()) {
}
/**
- * Cleans up a Set::insert formated string with given $options depending on the 'clean' key in
+ * Cleans up a String::insert() formated string with given $options depending on the 'clean' key in
* $options. The default method used is text but html is also available. The goal of this function
* is to replace all whitespace and uneeded markup around placeholders that did not get replaced
- * by Set::insert.
+ * by String::insert().
*
* @param string $str
* @param string $options
* @return string
* @access public
* @static
- * @see Set::insert()
+ * @see String::insert()
*/
function cleanInsert($str, $options) {
$clean = $options['clean'];
View
8 cake/libs/view/helper.php
@@ -191,7 +191,7 @@ function url($url = null, $full = false) {
* Checks if a file exists when theme is used, if no file is found default location is returned
*
* @param string $file The file to create a webroot path to.
- * @return string $webPath web path to file.
+ * @return string Web accessible path to file.
* @access public
*/
function webroot($file) {
@@ -250,9 +250,11 @@ function assetTimestamp($path) {
}
/**
- * Used to remove harmful tags from content
+ * Used to remove harmful tags from content. Removes a number of well known XSS attacks
+ * from content. However, is not guaranteed to remove all possiblities. Escaping
+ * content is the best way to prevent all possible attacks.
*
- * @param mixed $output
+ * @param mixed $output Either an array of strings to clean or a single string to clean.
* @return cleaned content for output
* @access public
*/
View
2 cake/libs/view/view.php
@@ -448,7 +448,7 @@ function render($action = null, $layout = null, $file = null) {
* Renders a layout. Returns output from _render(). Returns false on error.
* Several variables are created for use in layout.
*
- * - `title_for_layout` - contains page title
+ * - `title_for_layout` - A backwards compatible place holder, you should set this value if you want more control.
* - `content_for_layout` - contains rendered view file
* - `scripts_for_layout` - contains scripts added to header
*

0 comments on commit 46348e9

Please sign in to comment.