Ejemplo n.º 1
0
 /**
  * Property get
  *
  * @param string $name
  * @return mixed
  */
 public function __get($name)
 {
     switch ($name) {
         case 'originalText':
             if ($this->properties[$name] === false) {
                 $this->properties[$name] = $this->startCursor->subString($this->endCursor->position);
             }
             return $this->properties[$name];
         case 'treeProperties':
             return $this->getTreeProperties();
         default:
             throw new ezcBasePropertyNotFoundException($name);
     }
 }
Ejemplo n.º 2
0
 /**
  * Stores the text from the source code using the $textStartCursor and
  * $textEndCursor and stores the result in the $text property.
  */
 public function storeText()
 {
     $this->text = $this->textStartCursor->subString($this->textEndCursor->position);
 }