public function __get($key)
{
// check attribute first
if (!is_null($this->getAttribute($key))) {
return $this->getAttribute($key);
}
switch (strtolower($key)) {
case 'outerhtml':
return $this->outerHtml();
case 'innerhtml':
return $this->innerHtml();
case 'text':
return $this->text();
case 'tag':
return $this->getTag();
case 'parent':
$this->getParent();
}
return null;
}