Esempio n. 1
0
 /**
  * Get the payload dictionary.
  *
  * @return @type array The payload dictionary.
  */
 protected function _getPayload()
 {
     $aPayload = parent::_getPayload();
     $aPayload['aps']['alert'] = array();
     if (isset($this->_sText) && !isset($this->_sLocKey)) {
         $aPayload['aps']['alert']['body'] = (string) $this->_sText;
     }
     if (isset($this->_sActionLocKey)) {
         $aPayload['aps']['alert']['action-loc-key'] = $this->_sActionLocKey == '' ? null : (string) $this->_sActionLocKey;
     }
     if (isset($this->_sLocKey)) {
         $aPayload['aps']['alert']['loc-key'] = (string) $this->_sLocKey;
     }
     if (isset($this->_aLocArgs)) {
         $aPayload['aps']['alert']['loc-args'] = $this->_aLocArgs;
     }
     if (isset($this->_sLaunchImage)) {
         $aPayload['aps']['alert']['launch-image'] = (string) $this->_sLaunchImage;
     }
     return $aPayload;
 }