/** * 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; }
/** * Get the payload dictionary. * * @return @type array The payload dictionary. */ protected function _getPayload() { $aPayload = parent::_getPayload(); $aAlert = array(); if (isset($this->_sText) && !isset($this->_sLocKey)) { $aAlert['body'] = (string) $this->_sText; } if (isset($this->_sActionLocKey)) { $aAlert['action-loc-key'] = $this->_sActionLocKey == '' ? null : (string) $this->_sActionLocKey; } if (isset($this->_sLocKey)) { $aAlert['loc-key'] = (string) $this->_sLocKey; } if (isset($this->_aLocArgs)) { $aAlert['loc-args'] = $this->_aLocArgs; } if (isset($this->_sLaunchImage)) { $aAlert['launch-image'] = (string) $this->_sLaunchImage; } if (count($aAlert)) { $aPayload[parent::APPLE_RESERVED_NAMESPACE][self::APPLE_ALERT_PROPERTY] = $aAlert; } return $aPayload; }