Ejemplo n.º 1
0
 /**
  * Get source time stamp
  *
  * @return int
  */
 public function getTimeStamp()
 {
     if (!isset($this->timestamp)) {
         $this->handler->populateTimestamp($this);
     }
     return $this->timestamp;
 }
Ejemplo n.º 2
0
 /**
  * <<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.");
     }
 }