Changeset 6468
- Timestamp:
- 12/11/07 21:28:45 (10 months ago)
- Files:
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/lib/view/escaper/sfOutputEscaperObjectDecorator.class.php
r5849 r6468 93 93 * 94 94 * @return string 95 *96 * @throws <b>sfException</b>97 95 */ 98 96 public function __toString() 99 97 { 100 if (method_exists($this->value, '__toString')) 101 { 102 return $this->escape($this->escapingMethod, $this->value->__toString()); 103 } 104 else 105 { 106 throw new sfException(sprintf('Object of class "%s" cannot be converted to string (Please create a __toString() method).', get_class($this->value))); 107 } 98 return $this->escape($this->escapingMethod, $this->value->__toString()); 108 99 } 109 100 }