Acl\Shell\AclShell::parseIdentifier PHP 메소드

parseIdentifier() 공개 메소드

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
리턴 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;
    }