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