|
Revision 3232, 1.4 kB
(checked in by fabien, 6 years ago)
|
updated phpdoc for lib/view directory (based on a patch from Rafael George)
|
- Property svn:mime-type set to
text/x-php
- Property svn:eol-style set to
native
- Property svn:keywords set to
Id
|
| Line | |
|---|
| 1 |
<?php |
|---|
| 2 |
|
|---|
| 3 |
|
|---|
| 4 |
|
|---|
| 5 |
|
|---|
| 6 |
|
|---|
| 7 |
|
|---|
| 8 |
|
|---|
| 9 |
|
|---|
| 10 |
|
|---|
| 11 |
|
|---|
| 12 |
|
|---|
| 13 |
|
|---|
| 14 |
|
|---|
| 15 |
|
|---|
| 16 |
|
|---|
| 17 |
|
|---|
| 18 |
|
|---|
| 19 |
|
|---|
| 20 |
abstract class sfOutputEscaperGetterDecorator extends sfOutputEscaper |
|---|
| 21 |
{ |
|---|
| 22 |
|
|---|
| 23 |
* Returns the raw, unescaped value associated with the key supplied. |
|---|
| 24 |
* |
|---|
| 25 |
* The key might be an index into an array or a value to be passed to the |
|---|
| 26 |
* decorated object's get() method. |
|---|
| 27 |
* |
|---|
| 28 |
* @param string The key to retrieve |
|---|
| 29 |
* |
|---|
| 30 |
* @return mixed The value |
|---|
| 31 |
*/ |
|---|
| 32 |
public abstract function getRaw($key); |
|---|
| 33 |
|
|---|
| 34 |
|
|---|
| 35 |
* Returns the escaped value associated with the key supplied. |
|---|
| 36 |
* |
|---|
| 37 |
* Typically (using this implementation) the raw value is obtained using the |
|---|
| 38 |
* {@link getRaw()} method, escaped and the result returned. |
|---|
| 39 |
* |
|---|
| 40 |
* @param string The key to retieve |
|---|
| 41 |
* @param string The escaping method (a PHP function) to use |
|---|
| 42 |
* |
|---|
| 43 |
* @return mixed The escaped value |
|---|
| 44 |
*/ |
|---|
| 45 |
public function get($key, $escapingMethod = null) |
|---|
| 46 |
{ |
|---|
| 47 |
if (!$escapingMethod) |
|---|
| 48 |
{ |
|---|
| 49 |
$escapingMethod = $this->escapingMethod; |
|---|
| 50 |
} |
|---|
| 51 |
|
|---|
| 52 |
return sfOutputEscaper::escape($escapingMethod, $this->getRaw($key)); |
|---|
| 53 |
} |
|---|
| 54 |
} |
|---|
| 55 |
|
|---|