Changeset 6469
- Timestamp:
- 12/11/07 21:29:10 (9 months ago)
- Files:
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
branches/1.0/lib/view/escaper/sfOutputEscaperObjectDecorator.class.php
r5850 r6469 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 }