Zephir\ClassDefinition::getLocalOrParentInitMethod PHP Method

getLocalOrParentInitMethod() public method

Returns the initialization method if any does exist
public getLocalOrParentInitMethod ( ) : ClassMethod
return ClassMethod
    public function getLocalOrParentInitMethod()
    {
        $method = $this->getInitMethod();
        if ($method) {
            $parentClassDefinition = $this->getExtendsClassDefinition();
            if ($parentClassDefinition instanceof ClassDefinition) {
                $method = $parentClassDefinition->getInitMethod();
                if ($method) {
                    $this->addInitMethod($method->getStatementsBlock());
                }
            }
        }
        return $method;
    }