Skip to content

Commit e571ddd

Browse files
authored
Release 21.10 (#20)
1 parent dd5a7d1 commit e571ddd

File tree

8 files changed

+159
-18
lines changed

8 files changed

+159
-18
lines changed

README.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,14 @@
11
# Aspose.BarCode Cloud SDK for PHP
22

3+
| WARNING: **Update SDK to version >= 21.9.0**: All SDK version < 21.9.0 will stop working soon! |
4+
| ---------------------------------------------------------------------------------------------- |
5+
36
[![License](https://img.shields.io/github/license/aspose-barcode-cloud/aspose-barcode-cloud-php)](LICENSE)
47
[![PHP Composer](https://github.com/aspose-barcode-cloud/aspose-barcode-cloud-php/actions/workflows/php.yml/badge.svg)](https://github.com/aspose-barcode-cloud/aspose-barcode-cloud-php/actions/workflows/php.yml)
58
[![Packagist Version](https://img.shields.io/packagist/v/aspose/barcode-cloud-php)](https://packagist.org/packages/aspose/barcode-cloud-php)
69

710
- API version: 3.0
8-
- Package version: 21.9.0
11+
- Package version: 21.10.0
912

1013
## Demo applications
1114

docs/Api/BarcodeApi.md

Lines changed: 14 additions & 6 deletions
Large diffs are not rendered by default.

docs/Model/ReaderParams.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,12 +29,14 @@ Name | Type | Description | Notes
2929
**allow_salt_and_pepper_filtering** | **bool** | Allows engine to recognize barcodes with salt and pepper noise type. Mode can remove small noise with white and black dots. | [optional]
3030
**allow_white_spots_removing** | **bool** | Allows engine to recognize image without small white spots as additional scan. Mode helps to recognize noised image as well as median smoothing filtering. | [optional]
3131
**check_more1_d_variants** | **bool** | Allows engine to recognize 1D barcodes with checksum by checking more recognition variants. Default value: False. | [optional]
32+
**fast_scan_only** | **bool** | Allows engine for 1D barcodes to quickly recognize middle slice of an image and return result without using any time-consuming algorithms. Default value: False. | [optional]
3233
**region_likelihood_threshold_percent** | **double** | Sets threshold for detected regions that may contain barcodes. Value 0.7 means that bottom 70% of possible regions are filtered out and not processed further. Region likelihood threshold must be between [0.05, 0.9] Use high values for clear images with few barcodes. Use low values for images with many barcodes or for noisy images. Low value may lead to a bigger recognition time. | [optional]
3334
**scan_window_sizes** | **int[]** | Scan window sizes in pixels. Allowed sizes are 10, 15, 20, 25, 30. Scanning with small window size takes more time and provides more accuracy but may fail in detecting very big barcodes. Combining of several window sizes can improve detection quality. | [optional]
3435
**similarity** | **double** | Similarity coefficient depends on how homogeneous barcodes are. Use high value for for clear barcodes. Use low values to detect barcodes that ara partly damaged or not lighten evenly. Similarity coefficient must be between [0.5, 0.9] | [optional]
3536
**skip_diagonal_search** | **bool** | Allows detector to skip search for diagonal barcodes. Setting it to false will increase detection time but allow to find diagonal barcodes that can be missed otherwise. Enabling of diagonal search leads to a bigger detection time. | [optional]
3637
**read_tiny_barcodes** | **bool** | Allows engine to recognize tiny barcodes on large images. Ignored if AllowIncorrectBarcodes is set to True. Default value: False. | [optional]
3738
**australian_post_encoding_table** | [**\Aspose\BarCode\Model\CustomerInformationInterpretingType**](CustomerInformationInterpretingType.md) | Interpreting Type for the Customer Information of AustralianPost BarCode.Default is CustomerInformationInterpretingType.Other. | [optional]
39+
**ignore_ending_filling_patterns_for_c_table** | **bool** | The flag which force AustraliaPost decoder to ignore last filling patterns in Customer Information Field during decoding as CTable method. CTable encoding method does not have any gaps in encoding table and sequnce \&quot;333\&quot; of filling paterns is decoded as letter \&quot;z\&quot;. | [optional]
3840

3941
[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md)
4042

src/Aspose/BarCode/BarcodeApi.php

Lines changed: 42 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1160,6 +1160,16 @@ protected function GetBarcodeRecognizeRequest(Requests\GetBarcodeRecognizeReques
11601160
}
11611161
}
11621162
// query params
1163+
if (isset($request->fast_scan_only)) {
1164+
$localName = lcfirst('FastScanOnly');
1165+
$localValue = is_bool($request->fast_scan_only) ? ($request->fast_scan_only ? 'true' : 'false') : $request->fast_scan_only;
1166+
if (strpos($resourcePath, '{' . $localName . '}') !== false) {
1167+
$resourcePath = str_replace('{' . $localName . '}', ObjectSerializer::toPathValue($localValue), $resourcePath);
1168+
} else {
1169+
$queryParams[$localName] = ObjectSerializer::toQueryValue($localValue);
1170+
}
1171+
}
1172+
// query params
11631173
if (isset($request->region_likelihood_threshold_percent)) {
11641174
$localName = lcfirst('RegionLikelihoodThresholdPercent');
11651175
$localValue = is_bool($request->region_likelihood_threshold_percent) ? ($request->region_likelihood_threshold_percent ? 'true' : 'false') : $request->region_likelihood_threshold_percent;
@@ -1223,6 +1233,16 @@ protected function GetBarcodeRecognizeRequest(Requests\GetBarcodeRecognizeReques
12231233
}
12241234
}
12251235
// query params
1236+
if (isset($request->ignore_ending_filling_patterns_for_c_table)) {
1237+
$localName = lcfirst('IgnoreEndingFillingPatternsForCTable');
1238+
$localValue = is_bool($request->ignore_ending_filling_patterns_for_c_table) ? ($request->ignore_ending_filling_patterns_for_c_table ? 'true' : 'false') : $request->ignore_ending_filling_patterns_for_c_table;
1239+
if (strpos($resourcePath, '{' . $localName . '}') !== false) {
1240+
$resourcePath = str_replace('{' . $localName . '}', ObjectSerializer::toPathValue($localValue), $resourcePath);
1241+
} else {
1242+
$queryParams[$localName] = ObjectSerializer::toQueryValue($localValue);
1243+
}
1244+
}
1245+
// query params
12261246
if (isset($request->rectangle_region)) {
12271247
$localName = lcfirst('RectangleRegion');
12281248
$localValue = is_bool($request->rectangle_region) ? ($request->rectangle_region ? 'true' : 'false') : $request->rectangle_region;
@@ -1769,6 +1789,16 @@ protected function PostBarcodeRecognizeFromUrlOrContentRequest(Requests\PostBarc
17691789
}
17701790
}
17711791
// query params
1792+
if (isset($request->fast_scan_only)) {
1793+
$localName = lcfirst('FastScanOnly');
1794+
$localValue = is_bool($request->fast_scan_only) ? ($request->fast_scan_only ? 'true' : 'false') : $request->fast_scan_only;
1795+
if (strpos($resourcePath, '{' . $localName . '}') !== false) {
1796+
$resourcePath = str_replace('{' . $localName . '}', ObjectSerializer::toPathValue($localValue), $resourcePath);
1797+
} else {
1798+
$queryParams[$localName] = ObjectSerializer::toQueryValue($localValue);
1799+
}
1800+
}
1801+
// query params
17721802
if (isset($request->region_likelihood_threshold_percent)) {
17731803
$localName = lcfirst('RegionLikelihoodThresholdPercent');
17741804
$localValue = is_bool($request->region_likelihood_threshold_percent) ? ($request->region_likelihood_threshold_percent ? 'true' : 'false') : $request->region_likelihood_threshold_percent;
@@ -1832,6 +1862,16 @@ protected function PostBarcodeRecognizeFromUrlOrContentRequest(Requests\PostBarc
18321862
}
18331863
}
18341864
// query params
1865+
if (isset($request->ignore_ending_filling_patterns_for_c_table)) {
1866+
$localName = lcfirst('IgnoreEndingFillingPatternsForCTable');
1867+
$localValue = is_bool($request->ignore_ending_filling_patterns_for_c_table) ? ($request->ignore_ending_filling_patterns_for_c_table ? 'true' : 'false') : $request->ignore_ending_filling_patterns_for_c_table;
1868+
if (strpos($resourcePath, '{' . $localName . '}') !== false) {
1869+
$resourcePath = str_replace('{' . $localName . '}', ObjectSerializer::toPathValue($localValue), $resourcePath);
1870+
} else {
1871+
$queryParams[$localName] = ObjectSerializer::toQueryValue($localValue);
1872+
}
1873+
}
1874+
// query params
18351875
if (isset($request->rectangle_region)) {
18361876
$localName = lcfirst('RectangleRegion');
18371877
$localValue = is_bool($request->rectangle_region) ? ($request->rectangle_region ? 'true' : 'false') : $request->rectangle_region;
@@ -1874,7 +1914,7 @@ protected function PostBarcodeRecognizeFromUrlOrContentRequest(Requests\PostBarc
18741914
} else {
18751915
$headers = $this->headerSelector->selectHeaders(
18761916
['application/json'],
1877-
['multipart/form-data', 'application/x-www-form-urlencoded', 'application/octet-stream']
1917+
['multipart/form-data', 'application/octet-stream']
18781918
);
18791919
}
18801920

@@ -2803,7 +2843,7 @@ protected function PutBarcodeGenerateFileRequest(Requests\PutBarcodeGenerateFile
28032843
} else {
28042844
$headers = $this->headerSelector->selectHeaders(
28052845
['application/json'],
2806-
['multipart/form-data', 'application/x-www-form-urlencoded', 'application/json', 'application/xml']
2846+
['application/json', 'application/xml', 'multipart/form-data']
28072847
);
28082848
}
28092849

src/Aspose/BarCode/Configuration.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ class Configuration implements JsonSerializable
4949
*
5050
* @var string
5151
*/
52-
protected $clientVersion = '21.9.0';
52+
protected $clientVersion = '21.10.0';
5353

5454
/*
5555
* ClientId for API
@@ -378,7 +378,7 @@ public static function toDebugReport()
378378
$report .= ' OS: ' . php_uname() . PHP_EOL;
379379
$report .= ' PHP Version: ' . PHP_VERSION . PHP_EOL;
380380
$report .= ' OpenAPI Spec Version: 3.0' . PHP_EOL;
381-
$report .= ' SDK Package Version: 21.9.0' . PHP_EOL;
381+
$report .= ' SDK Package Version: 21.10.0' . PHP_EOL;
382382
$report .= ' Temp Folder Path: ' . self::getDefaultConfiguration()->getTempFolderPath() . PHP_EOL;
383383

384384
return $report;

src/Aspose/BarCode/Model/ReaderParams.php

Lines changed: 65 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -88,12 +88,14 @@ class ReaderParams implements ArrayAccess
8888
'allow_salt_and_pepper_filtering' => 'bool',
8989
'allow_white_spots_removing' => 'bool',
9090
'check_more1_d_variants' => 'bool',
91+
'fast_scan_only' => 'bool',
9192
'region_likelihood_threshold_percent' => 'double',
9293
'scan_window_sizes' => 'int[]',
9394
'similarity' => 'double',
9495
'skip_diagonal_search' => 'bool',
9596
'read_tiny_barcodes' => 'bool',
96-
'australian_post_encoding_table' => '\Aspose\BarCode\Model\CustomerInformationInterpretingType'
97+
'australian_post_encoding_table' => '\Aspose\BarCode\Model\CustomerInformationInterpretingType',
98+
'ignore_ending_filling_patterns_for_c_table' => 'bool'
9799
];
98100

99101
/*
@@ -128,12 +130,14 @@ class ReaderParams implements ArrayAccess
128130
'allow_salt_and_pepper_filtering' => null,
129131
'allow_white_spots_removing' => null,
130132
'check_more1_d_variants' => null,
133+
'fast_scan_only' => null,
131134
'region_likelihood_threshold_percent' => 'double',
132135
'scan_window_sizes' => 'int32',
133136
'similarity' => 'double',
134137
'skip_diagonal_search' => null,
135138
'read_tiny_barcodes' => null,
136-
'australian_post_encoding_table' => null
139+
'australian_post_encoding_table' => null,
140+
'ignore_ending_filling_patterns_for_c_table' => null
137141
];
138142

139143
/*
@@ -189,12 +193,14 @@ public static function swaggerFormats()
189193
'allow_salt_and_pepper_filtering' => 'AllowSaltAndPepperFiltering',
190194
'allow_white_spots_removing' => 'AllowWhiteSpotsRemoving',
191195
'check_more1_d_variants' => 'CheckMore1DVariants',
196+
'fast_scan_only' => 'FastScanOnly',
192197
'region_likelihood_threshold_percent' => 'RegionLikelihoodThresholdPercent',
193198
'scan_window_sizes' => 'ScanWindowSizes',
194199
'similarity' => 'Similarity',
195200
'skip_diagonal_search' => 'SkipDiagonalSearch',
196201
'read_tiny_barcodes' => 'ReadTinyBarcodes',
197-
'australian_post_encoding_table' => 'AustralianPostEncodingTable'
202+
'australian_post_encoding_table' => 'AustralianPostEncodingTable',
203+
'ignore_ending_filling_patterns_for_c_table' => 'IgnoreEndingFillingPatternsForCTable'
198204
];
199205

200206
/*
@@ -229,12 +235,14 @@ public static function swaggerFormats()
229235
'allow_salt_and_pepper_filtering' => 'setAllowSaltAndPepperFiltering',
230236
'allow_white_spots_removing' => 'setAllowWhiteSpotsRemoving',
231237
'check_more1_d_variants' => 'setCheckMore1DVariants',
238+
'fast_scan_only' => 'setFastScanOnly',
232239
'region_likelihood_threshold_percent' => 'setRegionLikelihoodThresholdPercent',
233240
'scan_window_sizes' => 'setScanWindowSizes',
234241
'similarity' => 'setSimilarity',
235242
'skip_diagonal_search' => 'setSkipDiagonalSearch',
236243
'read_tiny_barcodes' => 'setReadTinyBarcodes',
237-
'australian_post_encoding_table' => 'setAustralianPostEncodingTable'
244+
'australian_post_encoding_table' => 'setAustralianPostEncodingTable',
245+
'ignore_ending_filling_patterns_for_c_table' => 'setIgnoreEndingFillingPatternsForCTable'
238246
];
239247

240248
/*
@@ -269,12 +277,14 @@ public static function swaggerFormats()
269277
'allow_salt_and_pepper_filtering' => 'getAllowSaltAndPepperFiltering',
270278
'allow_white_spots_removing' => 'getAllowWhiteSpotsRemoving',
271279
'check_more1_d_variants' => 'getCheckMore1DVariants',
280+
'fast_scan_only' => 'getFastScanOnly',
272281
'region_likelihood_threshold_percent' => 'getRegionLikelihoodThresholdPercent',
273282
'scan_window_sizes' => 'getScanWindowSizes',
274283
'similarity' => 'getSimilarity',
275284
'skip_diagonal_search' => 'getSkipDiagonalSearch',
276285
'read_tiny_barcodes' => 'getReadTinyBarcodes',
277-
'australian_post_encoding_table' => 'getAustralianPostEncodingTable'
286+
'australian_post_encoding_table' => 'getAustralianPostEncodingTable',
287+
'ignore_ending_filling_patterns_for_c_table' => 'getIgnoreEndingFillingPatternsForCTable'
278288
];
279289

280290
/*
@@ -363,12 +373,14 @@ public function __construct(array $data = null)
363373
$this->container['allow_salt_and_pepper_filtering'] = isset($data['allow_salt_and_pepper_filtering']) ? $data['allow_salt_and_pepper_filtering'] : null;
364374
$this->container['allow_white_spots_removing'] = isset($data['allow_white_spots_removing']) ? $data['allow_white_spots_removing'] : null;
365375
$this->container['check_more1_d_variants'] = isset($data['check_more1_d_variants']) ? $data['check_more1_d_variants'] : null;
376+
$this->container['fast_scan_only'] = isset($data['fast_scan_only']) ? $data['fast_scan_only'] : null;
366377
$this->container['region_likelihood_threshold_percent'] = isset($data['region_likelihood_threshold_percent']) ? $data['region_likelihood_threshold_percent'] : null;
367378
$this->container['scan_window_sizes'] = isset($data['scan_window_sizes']) ? $data['scan_window_sizes'] : null;
368379
$this->container['similarity'] = isset($data['similarity']) ? $data['similarity'] : null;
369380
$this->container['skip_diagonal_search'] = isset($data['skip_diagonal_search']) ? $data['skip_diagonal_search'] : null;
370381
$this->container['read_tiny_barcodes'] = isset($data['read_tiny_barcodes']) ? $data['read_tiny_barcodes'] : null;
371382
$this->container['australian_post_encoding_table'] = isset($data['australian_post_encoding_table']) ? $data['australian_post_encoding_table'] : null;
383+
$this->container['ignore_ending_filling_patterns_for_c_table'] = isset($data['ignore_ending_filling_patterns_for_c_table']) ? $data['ignore_ending_filling_patterns_for_c_table'] : null;
372384
}
373385

374386
/*
@@ -1019,6 +1031,30 @@ public function setCheckMore1DVariants($check_more1_d_variants)
10191031
return $this;
10201032
}
10211033

1034+
/*
1035+
* Gets fast_scan_only
1036+
*
1037+
* @return bool
1038+
*/
1039+
public function getFastScanOnly()
1040+
{
1041+
return $this->container['fast_scan_only'];
1042+
}
1043+
1044+
/*
1045+
* Sets fast_scan_only
1046+
*
1047+
* @param bool $fast_scan_only Allows engine for 1D barcodes to quickly recognize middle slice of an image and return result without using any time-consuming algorithms. Default value: False.
1048+
*
1049+
* @return $this
1050+
*/
1051+
public function setFastScanOnly($fast_scan_only)
1052+
{
1053+
$this->container['fast_scan_only'] = $fast_scan_only;
1054+
1055+
return $this;
1056+
}
1057+
10221058
/*
10231059
* Gets region_likelihood_threshold_percent
10241060
*
@@ -1162,6 +1198,30 @@ public function setAustralianPostEncodingTable($australian_post_encoding_table)
11621198

11631199
return $this;
11641200
}
1201+
1202+
/*
1203+
* Gets ignore_ending_filling_patterns_for_c_table
1204+
*
1205+
* @return bool
1206+
*/
1207+
public function getIgnoreEndingFillingPatternsForCTable()
1208+
{
1209+
return $this->container['ignore_ending_filling_patterns_for_c_table'];
1210+
}
1211+
1212+
/*
1213+
* Sets ignore_ending_filling_patterns_for_c_table
1214+
*
1215+
* @param bool $ignore_ending_filling_patterns_for_c_table The flag which force AustraliaPost decoder to ignore last filling patterns in Customer Information Field during decoding as CTable method. CTable encoding method does not have any gaps in encoding table and sequnce \"333\" of filling paterns is decoded as letter \"z\".
1216+
*
1217+
* @return $this
1218+
*/
1219+
public function setIgnoreEndingFillingPatternsForCTable($ignore_ending_filling_patterns_for_c_table)
1220+
{
1221+
$this->container['ignore_ending_filling_patterns_for_c_table'] = $ignore_ending_filling_patterns_for_c_table;
1222+
1223+
return $this;
1224+
}
11651225
/*
11661226
* Returns true if offset exists. False otherwise.
11671227
*

0 commit comments

Comments
 (0)