/** * @return \Donquixote\HastyReflectionCommon\Reflection\ClassLike\ClassLikeReflectionInterface[] */ protected function buildAllInterfacesWithoutSelf() { $interfaces = $this->ownInterfaces->getOwnInterfaces(); foreach ($interfaces as $interface) { $interfaces += $interface->getAllInterfaces(FALSE); } if ($parentClass = $this->extends->getParentClass()) { $interfaces += $parentClass->getAllInterfaces(FALSE); } return $interfaces; }
/** * @return \Donquixote\HastyReflectionCommon\Reflection\FunctionLike\MethodReflectionInterface[] */ protected function findMethods() { $methods = $this->getOwnMethods(); $parentClass = $this->extends->getParentClass(); if (NULL !== $parentClass) { $methods += $parentClass->getMethods(); } foreach ($this->interfacesAll->getAllInterfaces(FALSE) as $interface) { $methods += $interface->getOwnMethods(); } return $methods; }
/** * @return bool */ protected function calcHasMethods() { if ($this->ownBody->hasOwnMethods()) { return TRUE; } if (NULL !== ($parentClass = $this->extends->getParentClass())) { if ($parentClass->hasMethods()) { return TRUE; } } foreach ($this->interfacesAll->getAllInterfaces(FALSE) as $interface) { if ($interface->hasMethods()) { return TRUE; } } return FALSE; }
/** * Gets the parent class, or NULL if it does not have one. * * @return \Donquixote\HastyReflectionCommon\Reflection\ClassLike\ClassLikeReflectionInterface|null */ function getParentClass() { return $this->extends->getParentClass(); }