Caffeinated\Shinobi\Traits\ShinobiTrait::__call PHP Метод

__call() публичный Метод

Magic __call method to handle dynamic methods.
public __call ( string $method, array $arguments = [] ) : mixed
$method string
$arguments array
Результат mixed
    public function __call($method, $arguments = [])
    {
        // Handle isRoleslug() methods
        if (starts_with($method, 'is') and $method !== 'is') {
            $role = substr($method, 2);
            return $this->isRole($role);
        }
        // Handle canDoSomething() methods
        if (starts_with($method, 'can') and $method !== 'can') {
            $permission = substr($method, 3);
            return $this->can($permission);
        }
        return parent::__call($method, $arguments);
    }