Nearsoft\SeleniumClient\WebElement::__call PHP Метод

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

The methods should be invoked with the format 'set/get'. Arguments should match those required by setAttribute and getAttribute methods. i.e. setClassName, getInnerHTML, getClassName
public __call ( string $name, array $args ) : mixed
$name string
$args array
Результат mixed
    public function __call($name, array $args)
    {
        $whitelist = array('className', 'innerHTML', 'outerHTML', 'text', 'value');
        $method = lcfirst(substr($name, 3));
        $operation = in_array($method, $whitelist) ? substr($name, 0, 3) : '';
        switch ($operation) {
            case 'set':
                $this->setAttribute($method, $args[0]);
                return $method != 'outerHTML' ? $this : null;
            case 'get':
                return $this->getAttribute($method);
                break;
            default:
                throw new \Exception('Invalid magic call');
        }
    }