Create a new NotificationInstance

@param array|Options $options Optional Arguments
@return NotificationInstance Newly created NotificationInstance
@throws TwilioException When an HTTP error occurs.
1400
public function create($options = array()) {
        $options = new Values($options);

        $data = Values::of(array(
            'Identity' => Serialize::map($options['identity'], function($e) { return $e; }),
            'Tag' => Serialize::map($options['tag'], function($e) { return $e; }),
            'Body' => $options['body'],
            'Priority' => $options['priority'],
            'Ttl' => $options['ttl'],
            'Title' => $options['title'],
            'Sound' => $options['sound'],
            'Action' => $options['action'],
            'Data' => Serialize::jsonObject($options['data']),
            'Apn' => Serialize::jsonObject($options['apn']),
            'Gcm' => Serialize::jsonObject($options['gcm']),
            'Sms' => Serialize::jsonObject($options['sms']),
            'FacebookMessenger' => Serialize::jsonObject($options['facebookMessenger']),
            'Fcm' => Serialize::jsonObject($options['fcm']),
            'Segment' => Serialize::map($options['segment'], function($e) { return $e; }),
            'Alexa' => Serialize::jsonObject($options['alexa']),
            'ToBinding' => Serialize::map($options['toBinding'], function($e) { return $e; }),
        ));

        $payload = $this->version->create(
            'POST',
            $this->uri,
            array(),
            $data
        );

        return new NotificationInstance($this->version, $payload, $this->solution['serviceSid']);
    }
960636
public function create($name, $type, array $options)
    {
        if (is_string($type)) {
            $type = $this->registry->getType($type);
        }
        if (!$type instanceof WidgetTypeInterface) {
            throw new \InvalidArgumentException('Unexpected widget type.');
        }

        $options['name'] = $name;

        $resolver = new OptionsResolver();
        $type->configureOptions($resolver);
        $options = $resolver->resolve($options);

        $widget = new Widget($name, $type);
        $type->buildWidget($widget, $options);

        return $widget;
    }
144725
public function sendNotify($applicationName, $notificationName, $notificationTitle, $notificationText, $options = array())
    {
        $notification_options = $options;
        $notification_options['text'] = $notificationText;
        $register = new RegisterRequest($applicationName);
        $register->addNotification($notificationName);
        $notify = new NotificationRequest($applicationName, $notificationName, $notificationTitle, $notification_options);
        return $this->notifyOrRegister($notify, $register)->getStatus();
    }
934531
public function renderNotifications(NotifiableInterface $notifiable, array $options)
    {
        $order = array_key_exists('order', $options) ? $options['order'] : null;
        $limit = array_key_exists('limit', $options) ? $options['limit'] : null;
        $offset = array_key_exists('offset', $options) ? $options['offset'] : null;

        if ($options['seen']) {
            $notifications = $this->notificationManager->getNotifications($notifiable, $order, $limit, $offset);
        } else {
            $notifications = $this->notificationManager->getUnseenNotifications($notifiable, $order, $limit, $offset);
        }

        // if the template option is set, use custom template
        $template = array_key_exists('template', $options) ? $options['template'] : '@MgiletNotification/notification_list.html.twig';

        return $this->twig->render($template,
            array(
                'notificationList' => $notifications
            )
        );
    }
476410
public function serialize(AnnouncementAggregate $announcements, array $options = [])
    {
        $announcePosts = $announcements->getAnnouncements()->toArray();

        if (in_array(static::VISIBLE_POSTS_ONLY, $options)) {
            // filter embed announces to only get visible ones
            $now = new \DateTime('now');
            $announcePosts = array_values(// reindex array for correct serialization
                array_filter($announcePosts, function (Announcement $announcement) use ($now) {
                    return $announcement->isVisible()
                        && (empty($announcement->getVisibleFrom()) || $announcement->getVisibleFrom() <= $now)
                        && (empty($announcement->getVisibleUntil()) || $announcement->getVisibleUntil() > $now);
                })
            );
        }

        return [
            'id' => $announcements->getUuid(),
            'posts' => array_map(function (Announcement $announcement) {
                return $this->announcementSerializer->serialize($announcement);
            }, $announcePosts),
        ];
    }
1073493
public function add($content = NULL, $options = [])
    {
			if (!empty($content)) $options['content'] = $content;
      $this->notifications->push(new Notification($options));
      return $this->flash();
    }
1293512
public function checkMessages(array $options = [])
    {
        $this->buildCall('/text');

        $rawMessages = $this->getRequest()->xml();

        return $this->makeMessages($rawMessages->Text);
    }
770848
public function warning(string $message, string $title = '', array $options = []): self
    {
        return $this->addNotification(self::WARNING, $message, $title, $options);
    }
966935
public function send($notifiables, $notification)
    {
        return (new NotificationSender(
            $this, $this->app->make(Bus::class), $this->app->make(Dispatcher::class), $this->locale)
        )->send($notifiables, $notification);
    }
1273133
public function create(array $options = [])
    {
        $this->info = $this->connection->createTopic($options + [
            'name' => $this->name
        ]);

        return $this->info;
    }
940849
public function createOptions(Array $options) {

		$this->options = [];

		foreach($options as $value => $label) {
			$this->appendOption(new RadioOptionElement($value, new LabelElement($label)));
		}
		
		return $this;

	}
802753
public static function createFromOptions(array $options)
    {
        Validate::notNull($options['AssetId'], 'options[AssetId]');
        Validate::notNull($options['AccessPolicyId'], 'options[AccessPolicyId]');
        Validate::notNull($options['Type'], 'options[Type]');

        $locator = new self(
            $options['AssetId'],
            $options['AccessPolicyId'],
            $options['Type']
        );
        $locator->fromArray($options);

        return $locator;
    }
525956
public function notify($exception, $options = array()) {
		$this->_checkConfig();

		$config = array_merge($this->_config, $options);

		$sock = fsockopen(
			$this->_buildTcpScheme($config),
			$config['port'],
			$errno, $errstr,
			$config['connect_timeout']
		);

		if ($sock) {
			stream_set_timeout($sock, $config['write_timeout']);
			fwrite($sock, $this->_buildHttpPayload($exception, $config));
			fclose($sock);
		}

		foreach ($this->_observers as $observer) {
			$observer($exception, $config);
		}

		return $this;
	}
1065885
public function putNotificationQuery($expires, $options=array())
    {
        $req = $this->putNotificationRequest($options);
        return $req->query_sign($expires);
    }
18534
protected function createPubSub(array $options = null, $callable = null)
    {
        $pubsub = new PubSubConsumer($this, $options);

        if (!isset($callable)) {
            return $pubsub;
        }

        foreach ($pubsub as $message) {
            if (call_user_func($callable, $pubsub, $message) === false) {
                $pubsub->stop();
            }
        }
    }
1043424
public static function create(array $options = [], $logger = Client::LOG_NONE)
    {
        $oauth = new Oauth1([
            'token_secret' => '',
            'consumer_key' => $options['consumerKey'],
            'consumer_secret' => $options['consumerSecret']
        ]);

        $stack = HandlerStack::create();
        $stack->push($oauth);

        if (!empty($logger)) {
            $stack->push(
                Middleware::log($logger, new MessageFormatter(MessageFormatter::DEBUG))
            );
        }

        $client = new \GuzzleHttp\Client([
            'base_uri' => self::$url,
            'handler' => $stack,
            'auth' => 'oauth'
        ]);

        $mapper = new ResultObjectMapper();

        return new self(
            new Guzzle\ClientAdapter($client, new Guzzle\ExceptionMapper($mapper)),
            new Validator(Validation::createValidator()),
            $mapper
        );
    }
1155693
public function create($options = NULL) {
        return $this->request("POST", self::URL_TOKENS, $api_key = $this->culqi->api_key, $options, true);
    }