Ejemplo n.º 1
0
 public function __toString()
 {
     $parent_string = parent::__toString();
     $output = array();
     $output[] = sprintf("<TimeSpan%s>", isset($this->id) ? sprintf(" id=\"%s\"", $this->id) : "");
     $output[] = $parent_string;
     $output[] = "</TimeSpan>";
     return implode("\n", $output);
 }
Ejemplo n.º 2
0
 public function __toString()
 {
     $parent_string = parent::__toString();
     $output = array();
     if (isset($this->when)) {
         $output[] = sprintf("<TimeStamp%s>", isset($this->id) ? sprintf(" id=\"%s\"", $this->id) : "");
         $output[] = $parent_string;
         $output[] = $this->when->__toString();
         $output[] = "</TimeStamp>";
     }
     return implode("\n", $output);
 }