Exemple #1
0
 /**
  * Returns the raw content of the template
  * @return string
  */
 public function getContent()
 {
     if ($this->contentCache === null) {
         $this->contentCache = $this->handler->getContent($this);
     }
     return $this->contentCache;
 }
 /**
  * <<magic>> Generic getter.
  *
  * @param  string          $property_name valid: timestamp, exists, content
  * @return mixed
  * @throws SmartyException if $property_name is not valid
  */
 public function __get($property_name)
 {
     switch ($property_name) {
         case 'timestamp':
         case 'exists':
             $this->handler->populateTimestamp($this);
             return $this->{$property_name};
         case 'content':
             return $this->content = $this->handler->getContent($this);
         default:
             throw new SmartyException("source property '{$property_name}' does not exist.");
     }
 }