public function resolveRelativeName($shortClassName) { if ($this->useStatements === null) { $p = new StaticReflectionParser($this->className, new ReflectionClassFinder()); $this->useStatements = $p->getUseStatements(); $this->namespace = $p->getNamespaceName(); } $matches = array(); preg_match("/^[a-zA-Z_-ÿ][a-zA-Z0-9_-ÿ]*/", $shortClassName, $matches); $firstName = strtolower($matches[0]); if (isset($this->useStatements[$firstName])) { return $this->useStatements[$firstName] . substr($shortClassName, strlen($firstName)); } else { return $this->namespace . "\\" . $shortClassName; } }
/** * {@inheritDoc} */ public function getNamespaceName() { return $this->staticReflectionParser->getNamespaceName(); }