Chris@12: fqsen = $fqsen; Chris@12: Chris@12: if (isset($matches[2])) { Chris@12: $this->name = $matches[2]; Chris@12: } else { Chris@12: $matches = explode('\\', $fqsen); Chris@12: $this->name = trim(end($matches), '()'); Chris@12: } Chris@12: } Chris@12: Chris@12: /** Chris@12: * converts this class to string. Chris@12: * Chris@12: * @return string Chris@12: */ Chris@12: public function __toString() Chris@12: { Chris@12: return $this->fqsen; Chris@12: } Chris@12: Chris@12: /** Chris@12: * Returns the name of the element without path. Chris@12: * Chris@12: * @return string Chris@12: */ Chris@12: public function getName() Chris@12: { Chris@12: return $this->name; Chris@12: } Chris@12: }