Jyxo\HtmlTag::__call PHP Method

__call() public method

Sets or returns the attribute.
public __call ( string $method, array $args ) : mixed
$method string Method name
$args array Method attributes
return mixed string|Jyxo_HtmlTag
    public function __call(string $method, array $args)
    {
        $type = $method[0] === 's' ? 'set' : 'get';
        if ($type === 'set') {
            $this->attributes[strtolower(substr($method, 3))] = $args[0];
            return $this;
        } else {
            if (isset($this->attributes[strtolower(substr($method, 3))])) {
                return $this->attributes[strtolower(substr($method, 3))];
            }
            return '';
        }
    }