コード例 #1
0
 /**
  * @param $message
  */
 public function notify($message)
 {
     $push = new Push();
     $push->setTitle(APP_NAME);
     $push->setMessage($message);
     $this->pushManager->push($push);
 }
コード例 #2
0
ファイル: Pushover.php プロジェクト: levi-putna/yii2-pushover
 public function send($message, $title = null, $sound = null)
 {
     //work out what sound to use
     $sound = is_null($sound) ? $this->default_sound : $sound;
     //setup the message
     $notification = new Push();
     $notification->setMessage($message);
     $notification->setTitle($title);
     $notification->setSound($sound);
     // Push it!
     $client = $this->getClient();
     $client->push($notification);
 }