[ Index ] |
|
Code source de Symfony 1.0.0 |
[Code source] [Imprimer] [Statistiques]
Abstract class that provides an interface for escaping of output.
Author: | Mike Squire <mike@somosis.co.uk> |
Version: | SVN: $Id: sfOutputEscaper.class.php 3232 2007-01-11 20:51:54Z fabien $ |
Poids: | 148 lignes (4 kb) |
Inclus ou requis: | 0 fois |
Référencé: | 0 fois |
Nécessite: | 0 fichiers |
__construct($escapingMethod, $value) X-Ref |
Constructor stores the escaping method and value. Since sfOutputEscaper is an abstract class, instances cannot be created directly but the constructor will be inherited by sub-classes. param: string Escaping method param: string Escaping value |
escape($escapingMethod, $value) X-Ref |
Decorates a PHP variable with something that will escape any data obtained from it. The following cases are dealt with: - The value is null or false: null or false is returned. - The value is scalar: the result of applying the escaping method is returned. - The value is an array or an object that implements the ArrayAccess interface: the array is decorated such that accesses to elements yield an escaped value. - The value implements the Traversable interface (either an Iterator, an IteratorAggregate or an internal PHP class that implements Traversable): decorated much like the array. - The value is another type of object: decorated such that the result of method calls is escaped. The escaping method is actually the name of a PHP function. There are a set of standard escaping methods listed in the escaping helper (sfEscapingHelper.php). param: string $escapingMethod the escaping method (a PHP function) to apply to the value param: mixed $value the value to escape param: mixed the escaped value return: mixed Escaping value |
getRawValue() X-Ref |
Returns the raw value associated with this instance. Concrete instances of sfOutputEscaper classes decorate a value which is stored by the constructor. This returns that original, unescaped, value. return: mixed The original value used to construct the decorator |
__get($var) X-Ref |
Gets a value from the escaper. param: string Value to get return: mixed Value |
Généré le : Fri Mar 16 22:42:14 2007 | par Balluche grâce à PHPXref 0.7 |