protected function getConstraint($foreign)
    {
        foreach ($this->getConstraints() as $constraint) {
            if ($constraint->foreign == $foreign) {
                return (object) $constraint;
            }
        }

        return null;
    }
protected function getConstraint($foreign)
    {
        foreach ($this->getConstraints() as $constraint) {
            if ($constraint->foreign == $foreign) {
                return (object) $constraint;
            }
        }

        return null;
    }
protected function getConstraint ( $ foreign ) { foreach ( $ this -> getConstraints ( ) as $ constraint ) { if ( $ constraint -> foreign == $ foreign ) { return ( object ) $ constraint ; } } return null ; }
Gets foreign key constraint info for a given column name.

@return mix (null|object)
Gets foreign key constraint info for a given column name .