public function addInheritance($inheritance)
    {
        if ($inheritance instanceof Inheritance) {
            $inheritance->setColumn($this);
            if (null === $this->inheritanceList) {
                $this->inheritanceList = [];
                $this->isEnumeratedClasses = true;
            }
            $this->inheritanceList[] = $inheritance;

            return $inheritance;
        }

        $inh = new Inheritance();
        $inh->loadMapping($inheritance);

        return $this->addInheritance($inh);
    }
public function addInheritance($inheritance)
    {
        if ($inheritance instanceof Inheritance) {
            $inheritance->setColumn($this);
            if (null === $this->inheritanceList) {
                $this->inheritanceList = [];
                $this->isEnumeratedClasses = true;
            }
            $this->inheritanceList[] = $inheritance;

            return $inheritance;
        }

        $inh = new Inheritance();
        $inh->loadMapping($inheritance);

        return $this->addInheritance($inh);
    }
public function addInheritance ( $ inheritance ) { if ( $ inheritance instanceof Inheritance ) { $ inheritance -> setColumn ( $ this ) ; if ( null === $ this -> inheritanceList ) { $ this -> inheritanceList = [ ] ; $ this -> isEnumeratedClasses = true ; } $ this -> inheritanceList [ ] = $ inheritance ; return $ inheritance ; } $ inh = new Inheritance ( ) ; $ inh -> loadMapping ( $ inheritance ) ; return $ this -> addInheritance ( $ inh ) ; }
Adds a new inheritance definition to the inheritance list and sets the
parent column of the inheritance to the current column.

@param  Inheritance|array $inheritance
@return Inheritance
Adds a new inheritance definition to the inheritance list and sets the parent column of the inheritance to the current column .