13 * to license@zend.com so we can send you a copy immediately. |
13 * to license@zend.com so we can send you a copy immediately. |
14 * |
14 * |
15 * @category Zend |
15 * @category Zend |
16 * @package Zend_Mobile |
16 * @package Zend_Mobile |
17 * @subpackage Zend_Mobile_Push |
17 * @subpackage Zend_Mobile_Push |
18 * @copyright Copyright (c) 2005-2011 Zend Technologies USA Inc. (http://www.zend.com) |
18 * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) |
19 * @license http://framework.zend.com/license/new-bsd New BSD License |
19 * @license http://framework.zend.com/license/new-bsd New BSD License |
20 */ |
20 */ |
21 |
21 |
22 /** Zend_Mobile_Push_Message_Mpns **/ |
22 /** Zend_Mobile_Push_Message_Mpns **/ |
23 require_once 'Zend/Mobile/Push/Message/Mpns.php'; |
23 require_once 'Zend/Mobile/Push/Message/Mpns.php'; |
|
24 |
|
25 /** Zend_Xml_Security */ |
|
26 require_once 'Zend/Xml/Security.php'; |
24 |
27 |
25 /** |
28 /** |
26 * Mpns Raw Message |
29 * Mpns Raw Message |
27 * |
30 * |
28 * @category Zend |
31 * @category Zend |
29 * @package Zend_Mobile |
32 * @package Zend_Mobile |
30 * @subpackage Zend_Mobile_Push |
33 * @subpackage Zend_Mobile_Push |
31 * @copyright Copyright (c) 2005-2011 Zend Technologies USA Inc. (http://www.zend.com) |
34 * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) |
32 * @license http://framework.zend.com/license/new-bsd New BSD License |
35 * @license http://framework.zend.com/license/new-bsd New BSD License |
33 */ |
36 */ |
34 class Zend_Mobile_Push_Message_Mpns_Raw extends Zend_Mobile_Push_Message_Mpns |
37 class Zend_Mobile_Push_Message_Mpns_Raw extends Zend_Mobile_Push_Message_Mpns |
35 { |
38 { |
36 /** |
39 /** |
92 public function setMessage($msg) |
95 public function setMessage($msg) |
93 { |
96 { |
94 if (!is_string($msg)) { |
97 if (!is_string($msg)) { |
95 throw new Zend_Mobile_Push_Message_Exception('$msg is not a string'); |
98 throw new Zend_Mobile_Push_Message_Exception('$msg is not a string'); |
96 } |
99 } |
97 if (!simplexml_load_string($msg)) { |
100 if (!Zend_Xml_Security::scan($msg)) { |
98 throw new Zend_Mobile_Push_Message_Exception('$msg is not valid xml'); |
101 throw new Zend_Mobile_Push_Message_Exception('$msg is not valid xml'); |
99 } |
102 } |
100 $this->_msg = $msg; |
103 $this->_msg = $msg; |
101 return $this; |
104 return $this; |
102 } |
105 } |