Acl\Shell\AclShell::parseIdentifier PHP Method

parseIdentifier() public method

Takes an identifier determines its type and returns the result as used by other methods.
public parseIdentifier ( string $identifier ) : mixed
$identifier string Identifier to parse
return mixed a string for aliases, and an array for model.foreignKey
    public function parseIdentifier($identifier)
    {
        if (preg_match('/^([\\w]+)\\.(.*)$/', $identifier, $matches)) {
            return ['model' => $matches[1], 'foreign_key' => $matches[2]];
        }
        return $identifier;
    }