/** * @param $message */ public function notify($message) { $push = new Push(); $push->setTitle(APP_NAME); $push->setMessage($message); $this->pushManager->push($push); }
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); }