Krucas\Notification\NotificationsBag::addType PHP Метод

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

Add new available type of message to bag.
public addType ( $type ) : NotificationsBag
$type
Результат NotificationsBag
    public function addType($type)
    {
        if (func_num_args() > 1) {
            foreach (func_get_args() as $t) {
                $this->addType($t);
            }
        } else {
            if (is_array($type)) {
                foreach ($type as $t) {
                    $this->addType($t);
                }
            } else {
                if (!$this->typeIsAvailable($type)) {
                    $this->types[] = $type;
                }
            }
        }
        return $this;
    }