/** * Inherits the given parent as if it was an class. * * @param ClassNode $parent Parent class to inherit from. * * @todo this method and inheritInterface should be separated into * different objects * * @return void */ protected function inheritClassObject(ClassNode $parent) { // if the parent class has not processed yet; do so. This will cause // a recurring effect which makes sure the tree is traversed bottom-to-top if (!$parent->is_processed) { $parent->setNodes($this->nodes); $parent->inherit(null); } $docblock = $this->getDocBlock(); $docblock->inherited_tags[] = 'package'; $docblock->inherited_tags[] = 'subpackage'; $docblock->inherit($parent->getDocBlock()); $this->inheritConstants($parent); $this->inheritProperties($parent); $this->inheritMethods($parent); }