Fenos\Notifynder\NotifynderManager::__call PHP Method

__call() public method

Call the custom sender method.
public __call ( $name, $arguments ) : void | mixed
$name
$arguments
return void | mixed
    public function __call($name, $arguments)
    {
        if (starts_with($name, 'send')) {
            $arguments = isset($arguments[0]) ? $arguments[0] : $this->toArray();
            $notificationsSent = $this->notifynderSender->customSender($name, $arguments);
            $this->refresh();
            return $notificationsSent;
        }
        $error = "method [{$name}] not found in the class " . self::class;
        throw new BadMethodCallException($error);
    }