/** * 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); } }
/** * 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); }