[ Index ]
 

Code source de CakePHP 1.1.13.4450

Accédez au Source d'autres logiciels libresSoutenez Angelica Josefina !

title

Body

[fermer]

/cake/libs/ -> sanitize.php (sommaire)

Washes strings from unwanted noise. Helpful methods to make unsafe strings usable.

Copyright: Copyright 2005-2007, Cake Software Foundation, Inc.
License: http://www.opensource.org/licenses/mit-license.php The MIT License
Version: $Revision: 4409 $
Poids: 245 lignes (6 kb)
Inclus ou requis:0 fois
Référencé: 0 fois
Nécessite: 0 fichiers

Définit 1 class

Sanitize:: (7 méthodes):
  paranoid()
  sql()
  html()
  cleanArray()
  cleanArrayR()
  cleanValue()
  formatColumns()


Classe: Sanitize  - X-Ref

Data Sanitization.

Removal of alpahnumeric characters, SQL-safe slash-added strings, HTML-friendly strings,
and all of the above on arrays.

paranoid($string, $allowed = array()   X-Ref
Removes any non-alphanumeric characters.

param: string $string
return: string

sql($string)   X-Ref
Makes a string SQL-safe by adding slashes (if needed).

param: string $string
return: string

html($string, $remove = false)   X-Ref
Returns given string safe for display as HTML. Renders entities.

param: string $string
param: boolean $remove If true, the string is stripped of all HTML tags
return: string

cleanArray(&$toClean)   X-Ref
Recursively sanitizes given array of data for safe input.

param: mixed $toClean
return: mixed

cleanArrayR(&$toClean)   X-Ref
Method used for recursively sanitizing arrays of data
for safe input

param: array $toClean
return: array The clean array

cleanValue($val)   X-Ref
Method used by cleanArray() to sanitize array nodes.

param: string $val
return: string

formatColumns(&$model)   X-Ref
Formats column data from definition in DBO's $columns array

param: Model $model The model containing the data to be formatted
return: void



Généré le : Sun Feb 25 19:27:47 2007 par Balluche grâce à PHPXref 0.7