protected function getForeignConstraint($name)
    {
        $raw = $this->getConstraint($name);

        if (is_null($raw)) {
            return null;
        }

        return new ForeignConstraint(
            $raw->foreign,
            $raw->references,
            $raw->on,
            strtolower($raw->onDelete),
            strtolower($raw->onUpdate),
            null,
            $raw->selfReferences
        );
    }
protected function getForeignConstraint($name)
    {
        $raw = $this->getConstraint($name);

        if (is_null($raw)) {
            return null;
        }

        return new ForeignConstraint(
            $raw->foreign,
            $raw->references,
            $raw->on,
            strtolower($raw->onDelete),
            strtolower($raw->onUpdate),
            null,
            $raw->selfReferences
        );
    }
protected function getForeignConstraint ( $ name ) { $ raw = $ this -> getConstraint ( $ name ) ; if ( is_null ( $ raw ) ) { return null ; } return new ForeignConstraint ( $ raw -> foreign , $ raw -> references , $ raw -> on , strtolower ( $ raw -> onDelete ) , strtolower ( $ raw -> onUpdate ) , null , $ raw -> selfReferences ) ; }
Gets the foreign constrain for the given field.

@param string $name

@return null || CrestApps\CodeGenerator\Models\ForeignConstraint
Gets the foreign constrain for the given field .