public function importParentClass(CodeBase $code_base)
{
if (!$this->isFirstExecution(__METHOD__)) {
return;
}
if (!$this->hasParentType()) {
return;
}
if ($this->getParentClassFQSEN() == $this->getFQSEN()) {
return;
}
// Let the parent class finder worry about this
if (!$code_base->hasClassWithFQSEN($this->getParentClassFQSEN())) {
return;
}
assert($code_base->hasClassWithFQSEN($this->getParentClassFQSEN()), "Clazz should already have been proven to exist.");
// Get the parent class
$parent = $this->getParentClass($code_base);
$parent->addReference($this->getContext());
// Tell the parent to import its own parents first
// Import elements from the parent
$this->importAncestorClass($code_base, $parent, $this->getParentTypeOption());
}