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