RedBeanPHP\QueryWriter\AQueryWriter::getForeignKeyForTypeProperty PHP Метод

getForeignKeyForTypeProperty() защищенный Метод

Given a type and a property name this method returns the foreign key map section associated with this pair.
protected getForeignKeyForTypeProperty ( string $type, string $property ) : array | null
$type string name of the type
$property string name of the property
Результат array | null
    protected function getForeignKeyForTypeProperty($type, $property)
    {
        $property = $this->esc($property, TRUE);
        try {
            $map = $this->getKeyMapForType($type);
        } catch (SQLException $e) {
            return NULL;
        }
        foreach ($map as $key) {
            if ($key['from'] === $property) {
                return $key;
            }
        }
        return NULL;
    }