public function resolve($asserter)
{
if (isset($this->resolved[$asserter])) {
return $this->resolved[$asserter];
}
if (false === $this->analyzer->isValidNamespace($asserter)) {
return null;
}
$class = null;
if (strpos($asserter, '\\') !== false) {
$class = $this->checkClass($asserter);
} else {
foreach ($this->namespaces as $namespace) {
$class = $this->checkClass($namespace . '\\' . $asserter);
if ($class !== null) {
break;
}
$class = $this->checkClass($namespace . '\\php' . ucfirst($asserter));
if ($class !== null) {
break;
}
}
}
$this->resolved[$asserter] = $class;
return $class;
}