Granada\Granada::_build_foreign_key_name PHP Méthode

_build_foreign_key_name() protected static méthode

Build a foreign key based on a table name. If the first argument (the specified foreign key column name) is null, returns the second argument (the name of the table) with the default foreign key column suffix appended.
protected static _build_foreign_key_name ( $specified_foreign_key_name, $table_name )
    protected static function _build_foreign_key_name($specified_foreign_key_name, $table_name)
    {
        if (!is_null($specified_foreign_key_name)) {
            return $specified_foreign_key_name;
        }
        return $table_name . self::DEFAULT_FOREIGN_KEY_SUFFIX;
    }