fqsen = $fqsen; if (isset($matches[2])) { $this->name = $matches[2]; } elseif ($fqsen === '\\') { $this->name = ''; } else { $matches = explode('\\', $fqsen); $name = end($matches); $this->name = trim($name, '()'); } } /** * 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; } }