| @@ -89,9 +89,9 @@ | ||
| 89 | 89 | * @return bool true if time is disabled. |
| 90 | 90 | */ |
| 91 | 91 | public function getNoTime() |
| 92 | 92 | { |
| 93 | - return (bool)$this->set('_no_time', false); | |
| 93 | + return (bool)$this->get('_no_time', false); | |
| 94 | 94 | } |
| 95 | 95 | |
| 96 | 96 | /** |
| 97 | 97 | * Controls the flag to declare a date as with no time. |
| @@ -108,8 +108,18 @@ | ||
| 108 | 108 | return $this; |
| 109 | 109 | } |
| 110 | 110 | |
| 111 | 111 | /** |
| 112 | + * @inheritDoc | |
| 113 | + * | |
| 114 | + * @since 1.16.5 (J) - 1.6.5 (WP) | |
| 115 | + */ | |
| 116 | + public function getOptions() | |
| 117 | + { | |
| 118 | + return (array)$this->get('_options', []); | |
| 119 | + } | |
| 120 | + | |
| 121 | + /** | |
| 112 | 122 | * Returns the notification data object to be encoded. |
| 113 | 123 | * |
| 114 | 124 | * @return object the notification data object for the document. |
| 115 | 125 | */ |
| @@ -114,10 +124,18 @@ | ||
| 114 | 124 | * @return object the notification data object for the document. |
| 115 | 125 | */ |
| 116 | 126 | public function toDataObject() |
| 117 | 127 | { |
| 128 | + // get all data options set | |
| 129 | + $options = $this->getOptions(); | |
| 130 | + | |
| 118 | 131 | // access all "public" (not reserved) properties |
| 119 | 132 | $props = $this->getProperties($public = true); |
| 133 | + | |
| 134 | + // merge public properties with data options, if any | |
| 135 | + if ($options) { | |
| 136 | + $props['_options'] = $options; | |
| 137 | + } | |
| 120 | 138 | |
| 121 | 139 | // build data object |
| 122 | 140 | $data = (object)$props; |
| 123 | 141 | $data->type = $this->getType(); |