Krucas\Notification\NotificationsBag::__call PHP Method

__call() public method

Execute short version of function calls.
public __call ( $name, $arguments ) : NotificationsBag | string
$name
$arguments
return NotificationsBag | string
    public function __call($name, $arguments)
    {
        if (($extracted = $this->extractType($name)) !== false) {
            switch ($extracted[1]) {
                case 'add':
                    return $this->add($extracted[0], isset($arguments[0]) ? $arguments[0] : null, true, isset($arguments[1]) ? $arguments[1] : null);
                    break;
                case 'instant':
                    return $this->add($extracted[0], isset($arguments[0]) ? $arguments[0] : null, false, isset($arguments[1]) ? $arguments[1] : null);
                    break;
                case 'clear':
                    return $this->clear($extracted[0]);
                    break;
                case 'show':
                    return $this->show($extracted[0], isset($arguments[0]) ? $arguments[0] : null);
                    break;
            }
        }
    }