Skip to content

Commit 0b75a7b

Browse files
Merge branch 'master' into release
2 parents 46d3d33 + 8453815 commit 0b75a7b

29 files changed

+9178
-4663
lines changed

README.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,14 @@ This repository contains Aspose.Words Cloud SDK for PHP source code. This SDK al
1313
* Watermarks and protection
1414
* Full read & write access to Document Object Model, including sections, paragraphs, text, images, tables, headers/footers and many others
1515

16+
## Enhancements in Version 23.12
17+
18+
- Properties Name, Text, StartRange, EndRange marked as required for InsertBookmark operation.
19+
- Implemented DeleteOfficeMathObjects operation to delete all office math objects from document.
20+
- Parameter ProtectionRequest was removed from the UnprotectDocument operation. Now removing protection from a document does not require a password.
21+
- Model ProtectionRequest marked as deprecated, please use ProtectionRequestV2 instead for perform ProtectDocument operation. To change the password or protection type of protected document, the old password is no required.
22+
23+
1624
## Enhancements in Version 23.11
1725

1826
- Support of required properties in models.

src/Aspose/Words/Configuration.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ class Configuration
134134
* Version of Aspose.Words Cloud API
135135
*
136136
*/
137-
protected $clientVersion = '23.11';
137+
protected $clientVersion = '23.12';
138138

139139
/*
140140
* Stores timeout in seconds
@@ -539,7 +539,7 @@ public static function toDebugReport()
539539
$report = 'PHP SDK (Aspose\Words) Debug Report:' . PHP_EOL;
540540
$report .= ' OS: ' . php_uname() . PHP_EOL;
541541
$report .= ' PHP Version: ' . PHP_VERSION . PHP_EOL;
542-
$report .= ' OpenAPI Spec Version: 23.11' . PHP_EOL;
542+
$report .= ' OpenAPI Spec Version: 23.12' . PHP_EOL;
543543
$report .= ' Temp Folder Path: ' . self::getDefaultConfiguration()->getTempFolderPath() . PHP_EOL;
544544

545545
return $report;

src/Aspose/Words/Model/BookmarkInsert.php

Lines changed: 87 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -27,14 +27,15 @@
2727
*/
2828

2929
namespace Aspose\Words\Model;
30+
use \ArrayAccess;
3031
use \Aspose\Words\ObjectSerializer;
3132

3233
/*
3334
* BookmarkInsert
3435
*
3536
* @description Represents a bookmark to insert.
3637
*/
37-
class BookmarkInsert extends BookmarkData
38+
class BookmarkInsert implements ArrayAccess
3839
{
3940
const DISCRIMINATOR = null;
4041

@@ -51,6 +52,8 @@ class BookmarkInsert extends BookmarkData
5152
* @var string[]
5253
*/
5354
protected static $swaggerTypes = [
55+
'name' => 'string',
56+
'text' => 'string',
5457
'start_range' => '\Aspose\Words\Model\NewDocumentPosition',
5558
'end_range' => '\Aspose\Words\Model\NewDocumentPosition'
5659
];
@@ -61,6 +64,8 @@ class BookmarkInsert extends BookmarkData
6164
* @var string[]
6265
*/
6366
protected static $swaggerFormats = [
67+
'name' => 'null',
68+
'text' => 'null',
6469
'start_range' => 'null',
6570
'end_range' => 'null'
6671
];
@@ -72,7 +77,7 @@ class BookmarkInsert extends BookmarkData
7277
*/
7378
public static function swaggerTypes()
7479
{
75-
return self::$swaggerTypes + parent::swaggerTypes();
80+
return self::$swaggerTypes;
7681
}
7782

7883
/*
@@ -82,7 +87,7 @@ public static function swaggerTypes()
8287
*/
8388
public static function swaggerFormats()
8489
{
85-
return self::$swaggerFormats + parent::swaggerFormats();
90+
return self::$swaggerFormats;
8691
}
8792

8893
/*
@@ -92,6 +97,8 @@ public static function swaggerFormats()
9297
* @var string[]
9398
*/
9499
protected static $attributeMap = [
100+
'name' => 'Name',
101+
'text' => 'Text',
95102
'start_range' => 'StartRange',
96103
'end_range' => 'EndRange'
97104
];
@@ -102,6 +109,8 @@ public static function swaggerFormats()
102109
* @var string[]
103110
*/
104111
protected static $setters = [
112+
'name' => 'setName',
113+
'text' => 'setText',
105114
'start_range' => 'setStartRange',
106115
'end_range' => 'setEndRange'
107116
];
@@ -112,6 +121,8 @@ public static function swaggerFormats()
112121
* @var string[]
113122
*/
114123
protected static $getters = [
124+
'name' => 'getName',
125+
'text' => 'getText',
115126
'start_range' => 'getStartRange',
116127
'end_range' => 'getEndRange'
117128
];
@@ -124,7 +135,7 @@ public static function swaggerFormats()
124135
*/
125136
public static function attributeMap()
126137
{
127-
return parent::attributeMap() + self::$attributeMap;
138+
return self::$attributeMap;
128139
}
129140

130141
/*
@@ -134,7 +145,7 @@ public static function attributeMap()
134145
*/
135146
public static function setters()
136147
{
137-
return parent::setters() + self::$setters;
148+
return self::$setters;
138149
}
139150

140151
/*
@@ -144,7 +155,7 @@ public static function setters()
144155
*/
145156
public static function getters()
146157
{
147-
return parent::getters() + self::$getters;
158+
return self::$getters;
148159
}
149160

150161
/*
@@ -159,6 +170,13 @@ public function getModelName()
159170

160171

161172

173+
/*
174+
* Associative array for storing property values
175+
*
176+
* @var mixed[]
177+
*/
178+
protected $container = [];
179+
162180
/*
163181
* Constructor
164182
*
@@ -167,7 +185,8 @@ public function getModelName()
167185
*/
168186
public function __construct(array $data = null)
169187
{
170-
parent::__construct($data);
188+
$this->container['name'] = isset($data['name']) ? $data['name'] : null;
189+
$this->container['text'] = isset($data['text']) ? $data['text'] : null;
171190
$this->container['start_range'] = isset($data['start_range']) ? $data['start_range'] : null;
172191
$this->container['end_range'] = isset($data['end_range']) ? $data['end_range'] : null;
173192
}
@@ -177,20 +196,80 @@ public function __construct(array $data = null)
177196
*/
178197
public function validate()
179198
{
180-
parent::validate();
199+
if (!isset($this->container['name'])) {
200+
throw new \InvalidArgumentException('Property Name in BookmarkInsert is required.');
201+
}
181202

203+
if (!isset($this->container['text'])) {
204+
throw new \InvalidArgumentException('Property Text in BookmarkInsert is required.');
205+
}
206+
207+
if (!isset($this->container['start_range'])) {
208+
throw new \InvalidArgumentException('Property StartRange in BookmarkInsert is required.');
209+
}
182210

183211
if (isset($this->container['start_range'])) {
184212
$this->getStartRange()->validate();
185213
}
186214

215+
if (!isset($this->container['end_range'])) {
216+
throw new \InvalidArgumentException('Property EndRange in BookmarkInsert is required.');
217+
}
187218

188219
if (isset($this->container['end_range'])) {
189220
$this->getEndRange()->validate();
190221
}
191222

192223
}
193224

225+
/*
226+
* Gets name
227+
*
228+
* @return string
229+
*/
230+
public function getName()
231+
{
232+
return $this->container['name'];
233+
}
234+
235+
/*
236+
* Sets name
237+
*
238+
* @param string $name Gets or sets the name of the bookmark.
239+
*
240+
* @return $this
241+
*/
242+
public function setName($name)
243+
{
244+
$this->container['name'] = $name;
245+
return $this;
246+
}
247+
248+
249+
/*
250+
* Gets text
251+
*
252+
* @return string
253+
*/
254+
public function getText()
255+
{
256+
return $this->container['text'];
257+
}
258+
259+
/*
260+
* Sets text
261+
*
262+
* @param string $text Gets or sets text, enclosed in the bookmark.
263+
*
264+
* @return $this
265+
*/
266+
public function setText($text)
267+
{
268+
$this->container['text'] = $text;
269+
return $this;
270+
}
271+
272+
194273
/*
195274
* Gets start_range
196275
*

src/Aspose/Words/Model/CompareData.php

Lines changed: 41 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@ class CompareData implements ArrayAccess
5656
'compare_options' => '\Aspose\Words\Model\CompareOptions',
5757
'comparing_with_document' => 'string',
5858
'date_time' => '\DateTime',
59+
'file_reference' => '\Aspose\Words\Model\FileReference',
5960
'result_document_format' => 'string'
6061
];
6162

@@ -69,6 +70,7 @@ class CompareData implements ArrayAccess
6970
'compare_options' => 'null',
7071
'comparing_with_document' => 'null',
7172
'date_time' => 'null',
73+
'file_reference' => 'null',
7274
'result_document_format' => 'null'
7375
];
7476

@@ -103,6 +105,7 @@ public static function swaggerFormats()
103105
'compare_options' => 'CompareOptions',
104106
'comparing_with_document' => 'ComparingWithDocument',
105107
'date_time' => 'DateTime',
108+
'file_reference' => 'FileReference',
106109
'result_document_format' => 'ResultDocumentFormat'
107110
];
108111

@@ -116,6 +119,7 @@ public static function swaggerFormats()
116119
'compare_options' => 'setCompareOptions',
117120
'comparing_with_document' => 'setComparingWithDocument',
118121
'date_time' => 'setDateTime',
122+
'file_reference' => 'setFileReference',
119123
'result_document_format' => 'setResultDocumentFormat'
120124
];
121125

@@ -129,6 +133,7 @@ public static function swaggerFormats()
129133
'compare_options' => 'getCompareOptions',
130134
'comparing_with_document' => 'getComparingWithDocument',
131135
'date_time' => 'getDateTime',
136+
'file_reference' => 'getFileReference',
132137
'result_document_format' => 'getResultDocumentFormat'
133138
];
134139

@@ -194,6 +199,7 @@ public function __construct(array $data = null)
194199
$this->container['compare_options'] = isset($data['compare_options']) ? $data['compare_options'] : null;
195200
$this->container['comparing_with_document'] = isset($data['comparing_with_document']) ? $data['comparing_with_document'] : null;
196201
$this->container['date_time'] = isset($data['date_time']) ? $data['date_time'] : null;
202+
$this->container['file_reference'] = isset($data['file_reference']) ? $data['file_reference'] : null;
197203
$this->container['result_document_format'] = isset($data['result_document_format']) ? $data['result_document_format'] : null;
198204
}
199205

@@ -211,8 +217,12 @@ public function validate()
211217
$this->getCompareOptions()->validate();
212218
}
213219

214-
if (!isset($this->container['comparing_with_document'])) {
215-
throw new \InvalidArgumentException('Property ComparingWithDocument in CompareData is required.');
220+
if (!isset($this->container['file_reference'])) {
221+
throw new \InvalidArgumentException('Property FileReference in CompareData is required.');
222+
}
223+
224+
if (isset($this->container['file_reference'])) {
225+
$this->getFileReference()->validate();
216226
}
217227

218228
}
@@ -313,6 +323,30 @@ public function setDateTime($date_time)
313323
}
314324

315325

326+
/*
327+
* Gets file_reference
328+
*
329+
* @return \Aspose\Words\Model\FileReference
330+
*/
331+
public function getFileReference()
332+
{
333+
return $this->container['file_reference'];
334+
}
335+
336+
/*
337+
* Sets file_reference
338+
*
339+
* @param \Aspose\Words\Model\FileReference $file_reference Gets or sets the file reference.
340+
*
341+
* @return $this
342+
*/
343+
public function setFileReference($file_reference)
344+
{
345+
$this->container['file_reference'] = $file_reference;
346+
return $this;
347+
}
348+
349+
316350
/*
317351
* Gets result_document_format
318352
*
@@ -399,6 +433,11 @@ public function offsetUnset($offset)
399433
*/
400434
public function collectFilesContent($resultFilesContent)
401435
{
436+
if ($this->getFileReference() != null)
437+
{
438+
$resultFilesContent = $this->getFileReference()->collectFilesContent($resultFilesContent);
439+
}
440+
402441
return $resultFilesContent;
403442
}
404443

0 commit comments

Comments
 (0)