LdapTools\Query\LdapQueryBuilder::__call PHP Method

__call() public method

Determines which function, if any, should be called.
public __call ( string $method, array $arguments ) : mixed
$method string
$arguments array
return mixed
    public function __call($method, $arguments)
    {
        if (!preg_match('/^(from)(.*)$/', $method, $matches)) {
            throw new \RuntimeException(sprintf('The method "%s" is unknown.', $method));
        }
        $method = $matches[1];
        array_unshift($arguments, strtolower($matches[2]));
        return $this->{$method}(...$arguments);
    }