[ Index ]
 

Code source de Symfony 1.0.0

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

title

Body

[fermer]

/lib/view/escaper/ -> sfOutputEscaperObjectDecorator.class.php (sommaire)

(pas de description)

Poids: 109 lignes (3 kb)
Inclus ou requis:0 fois
Référencé: 0 fois
Nécessite: 0 fichiers

Définit 1 class

sfOutputEscaperObjectDecorator:: (3 méthodes):
  __call()
  getRaw()
  __toString()


Classe: sfOutputEscaperObjectDecorator  - X-Ref

Output escaping object decorator that intercepts all method calls and escapes
their return values.

__call($method, $args)   X-Ref
Magic PHP method that intercepts method calls, calls them on the objects
that is being escaped and escapes the result.

The calling of the method is changed slightly to accommodate passing a
specific escaping strategy. An additional parameter is appended to the
argument list which is the escaping strategy. The decorator will remove
and use this parameter as the escaping strategy if it begins with 'esc_'
(the prefix all escaping helper functions have).

For example if an object, $o, implements methods a() and b($arg):

$o->a()                // Escapes the return value of a()
$o->a(ESC_RAW)         // Uses the escaping method ESC_RAW with a()
$o->b('a')             // Escapes the return value of b('a')
$o->b('a', ESC_RAW);   // Uses the escaping method ESC_RAW with b('a')

param: string The method on the object to be called
param: array An array of arguments to be passed to the method
return: mixed The escaped value returned by the method

getRaw($key)   X-Ref
Returns the result of calling the get() method on the object, bypassing
any escaping, if that method exists.

If there is not a callable get() method this will throw an exception.

param: string The parameter to be passed to the get() get method
return: mixed The unescaped value returned

__toString()   X-Ref
Try to call decorated object __toString() method if exists.

return: string



Généré le : Fri Mar 16 22:42:14 2007 par Balluche grâce à PHPXref 0.7