public function isComplete()
 {
     parent::isComplete();
     if (!array_key_exists('alias', $this->data) && !array_key_exists('file_id', $this->data)) {
         throw new \InvalidArgumentException('You need to set alias or upload file for customizedcast!');
     }
 }
 function isComplete()
 {
     parent::isComplete();
     if (!array_key_exists("alias", $this->data) && !array_key_exists("file_id", $this->data)) {
         throw new Exception("You need to set alias or upload file for customizedcast!");
     }
 }
Exemplo n.º 3
0
 function __construct($ticker, $title, $text, $device_tokens, $type = 0, $param = '')
 {
     parent::__construct();
     $this->timestamp = strval(time());
     $this->validation_token = md5(strtolower($this->appkey[$type]) . strtolower($this->masterSecret[$type]) . strtolower($this->timestamp));
     $this->data["type"] = "unicast";
     $this->data["device_tokens"] = NULL;
     $this->setPredefinedKeyValue("appkey", $this->appkey[$type]);
     $this->setPredefinedKeyValue("timestamp", $this->timestamp);
     $this->setPredefinedKeyValue("validation_token", $this->validation_token);
     $this->setPredefinedKeyValue("device_tokens", $device_tokens);
     $this->setPredefinedKeyValue("ticker", $ticker);
     $this->setPredefinedKeyValue("title", $title);
     $this->setPredefinedKeyValue("text", $text);
     $this->setPredefinedKeyValue("after_open", "go_custom");
     $this->setPredefinedKeyValue("custom", $param);
     $this->setPredefinedKeyValue("production_mode", "true");
 }
Exemplo n.º 4
0
 public function __construct()
 {
     parent::__construct();
     $this->data['type'] = 'filecast';
     $this->data['file_id'] = null;
 }
Exemplo n.º 5
0
 public function __construct()
 {
     parent::__construct();
     $this->data['type'] = 'broadcast';
 }
Exemplo n.º 6
0
 function __construct()
 {
     parent::__construct();
     $this->data["type"] = "unicast";
     $this->data["device_tokens"] = NULL;
 }
Exemplo n.º 7
0
 function __construct()
 {
     parent::__construct();
     $this->data["type"] = "broadcast";
 }
Exemplo n.º 8
0
 function __construct()
 {
     parent::__construct();
     $this->data["type"] = "groupcast";
     $this->data["filter"] = NULL;
 }
Exemplo n.º 9
0
 function __construct()
 {
     parent::__construct();
     $this->data["type"] = "filecast";
     $this->data["file_id"] = NULL;
 }
Exemplo n.º 10
0
 public function __construct()
 {
     parent::__construct();
     $this->data['type'] = 'unicast';
     $this->data['device_tokens'] = null;
 }
Exemplo n.º 11
0
 public function __construct()
 {
     parent::__construct();
     $this->data['type'] = 'groupcast';
     $this->data['filter'] = null;
 }