Initial Commit

This commit is contained in:
David Stone
2024-11-30 18:24:12 -07:00
commit e8f7955c1c
5432 changed files with 1397750 additions and 0 deletions

View File

@@ -0,0 +1,156 @@
<?php
/**
* This file is part of FPDI
*
* @package setasign\Fpdi
* @copyright Copyright (c) 2023 Setasign GmbH & Co. KG (https://www.setasign.com)
* @license http://opensource.org/licenses/mit-license The MIT License
*/
namespace WP_Ultimo\Dependencies\setasign\Fpdi\PdfReader\DataStructure;
use WP_Ultimo\Dependencies\setasign\Fpdi\Math\Vector;
use WP_Ultimo\Dependencies\setasign\Fpdi\PdfParser\CrossReference\CrossReferenceException;
use WP_Ultimo\Dependencies\setasign\Fpdi\PdfParser\PdfParser;
use WP_Ultimo\Dependencies\setasign\Fpdi\PdfParser\PdfParserException;
use WP_Ultimo\Dependencies\setasign\Fpdi\PdfParser\Type\PdfArray;
use WP_Ultimo\Dependencies\setasign\Fpdi\PdfParser\Type\PdfNumeric;
use WP_Ultimo\Dependencies\setasign\Fpdi\PdfParser\Type\PdfType;
use WP_Ultimo\Dependencies\setasign\Fpdi\PdfParser\Type\PdfTypeException;
/**
* Class representing a rectangle
*/
class Rectangle
{
/**
* @var int|float
*/
protected $llx;
/**
* @var int|float
*/
protected $lly;
/**
* @var int|float
*/
protected $urx;
/**
* @var int|float
*/
protected $ury;
/**
* Create a rectangle instance by a PdfArray.
*
* @param PdfArray|mixed $array
* @param PdfParser $parser
* @return Rectangle
* @throws PdfTypeException
* @throws CrossReferenceException
* @throws PdfParserException
*/
public static function byPdfArray($array, PdfParser $parser)
{
$array = PdfArray::ensure(PdfType::resolve($array, $parser), 4)->value;
$ax = PdfNumeric::ensure(PdfType::resolve($array[0], $parser))->value;
$ay = PdfNumeric::ensure(PdfType::resolve($array[1], $parser))->value;
$bx = PdfNumeric::ensure(PdfType::resolve($array[2], $parser))->value;
$by = PdfNumeric::ensure(PdfType::resolve($array[3], $parser))->value;
return new self($ax, $ay, $bx, $by);
}
public static function byVectors(Vector $ll, Vector $ur)
{
return new self($ll->getX(), $ll->getY(), $ur->getX(), $ur->getY());
}
/**
* Rectangle constructor.
*
* @param float|int $ax
* @param float|int $ay
* @param float|int $bx
* @param float|int $by
*/
public function __construct($ax, $ay, $bx, $by)
{
$this->llx = \min($ax, $bx);
$this->lly = \min($ay, $by);
$this->urx = \max($ax, $bx);
$this->ury = \max($ay, $by);
}
/**
* Get the width of the rectangle.
*
* @return float|int
*/
public function getWidth()
{
return $this->urx - $this->llx;
}
/**
* Get the height of the rectangle.
*
* @return float|int
*/
public function getHeight()
{
return $this->ury - $this->lly;
}
/**
* Get the lower left abscissa.
*
* @return float|int
*/
public function getLlx()
{
return $this->llx;
}
/**
* Get the lower left ordinate.
*
* @return float|int
*/
public function getLly()
{
return $this->lly;
}
/**
* Get the upper right abscissa.
*
* @return float|int
*/
public function getUrx()
{
return $this->urx;
}
/**
* Get the upper right ordinate.
*
* @return float|int
*/
public function getUry()
{
return $this->ury;
}
/**
* Get the rectangle as an array.
*
* @return array
*/
public function toArray()
{
return [$this->llx, $this->lly, $this->urx, $this->ury];
}
/**
* Get the rectangle as a PdfArray.
*
* @return PdfArray
*/
public function toPdfArray()
{
$array = new PdfArray();
$array->value[] = PdfNumeric::create($this->llx);
$array->value[] = PdfNumeric::create($this->lly);
$array->value[] = PdfNumeric::create($this->urx);
$array->value[] = PdfNumeric::create($this->ury);
return $array;
}
}

View File

@@ -0,0 +1,325 @@
<?php
/**
* This file is part of FPDI
*
* @package setasign\Fpdi
* @copyright Copyright (c) 2023 Setasign GmbH & Co. KG (https://www.setasign.com)
* @license http://opensource.org/licenses/mit-license The MIT License
*/
namespace WP_Ultimo\Dependencies\setasign\Fpdi\PdfReader;
use WP_Ultimo\Dependencies\setasign\Fpdi\GraphicsState;
use WP_Ultimo\Dependencies\setasign\Fpdi\Math\Vector;
use WP_Ultimo\Dependencies\setasign\Fpdi\PdfParser\Filter\FilterException;
use WP_Ultimo\Dependencies\setasign\Fpdi\PdfParser\PdfParser;
use WP_Ultimo\Dependencies\setasign\Fpdi\PdfParser\PdfParserException;
use WP_Ultimo\Dependencies\setasign\Fpdi\PdfParser\Type\PdfArray;
use WP_Ultimo\Dependencies\setasign\Fpdi\PdfParser\Type\PdfDictionary;
use WP_Ultimo\Dependencies\setasign\Fpdi\PdfParser\Type\PdfHexString;
use WP_Ultimo\Dependencies\setasign\Fpdi\PdfParser\Type\PdfIndirectObject;
use WP_Ultimo\Dependencies\setasign\Fpdi\PdfParser\Type\PdfName;
use WP_Ultimo\Dependencies\setasign\Fpdi\PdfParser\Type\PdfNull;
use WP_Ultimo\Dependencies\setasign\Fpdi\PdfParser\Type\PdfNumeric;
use WP_Ultimo\Dependencies\setasign\Fpdi\PdfParser\Type\PdfStream;
use WP_Ultimo\Dependencies\setasign\Fpdi\PdfParser\Type\PdfString;
use WP_Ultimo\Dependencies\setasign\Fpdi\PdfParser\Type\PdfType;
use WP_Ultimo\Dependencies\setasign\Fpdi\PdfParser\Type\PdfTypeException;
use WP_Ultimo\Dependencies\setasign\Fpdi\PdfReader\DataStructure\Rectangle;
use WP_Ultimo\Dependencies\setasign\Fpdi\PdfParser\CrossReference\CrossReferenceException;
/**
* Class representing a page of a PDF document
*/
class Page
{
/**
* @var PdfIndirectObject
*/
protected $pageObject;
/**
* @var PdfDictionary
*/
protected $pageDictionary;
/**
* @var PdfParser
*/
protected $parser;
/**
* Inherited attributes
*
* @var null|array
*/
protected $inheritedAttributes;
/**
* Page constructor.
*
* @param PdfIndirectObject $page
* @param PdfParser $parser
*/
public function __construct(PdfIndirectObject $page, PdfParser $parser)
{
$this->pageObject = $page;
$this->parser = $parser;
}
/**
* Get the indirect object of this page.
*
* @return PdfIndirectObject
*/
public function getPageObject()
{
return $this->pageObject;
}
/**
* Get the dictionary of this page.
*
* @return PdfDictionary
* @throws PdfParserException
* @throws PdfTypeException
* @throws CrossReferenceException
*/
public function getPageDictionary()
{
if ($this->pageDictionary === null) {
$this->pageDictionary = PdfDictionary::ensure(PdfType::resolve($this->getPageObject(), $this->parser));
}
return $this->pageDictionary;
}
/**
* Get a page attribute.
*
* @param string $name
* @param bool $inherited
* @return PdfType|null
* @throws PdfParserException
* @throws PdfTypeException
* @throws CrossReferenceException
*/
public function getAttribute($name, $inherited = \true)
{
$dict = $this->getPageDictionary();
if (isset($dict->value[$name])) {
return $dict->value[$name];
}
$inheritedKeys = ['Resources', 'MediaBox', 'CropBox', 'Rotate'];
if ($inherited && \in_array($name, $inheritedKeys, \true)) {
if ($this->inheritedAttributes === null) {
$this->inheritedAttributes = [];
$inheritedKeys = \array_filter($inheritedKeys, function ($key) use($dict) {
return !isset($dict->value[$key]);
});
if (\count($inheritedKeys) > 0) {
$parentDict = PdfType::resolve(PdfDictionary::get($dict, 'Parent'), $this->parser);
while ($parentDict instanceof PdfDictionary) {
foreach ($inheritedKeys as $index => $key) {
if (isset($parentDict->value[$key])) {
$this->inheritedAttributes[$key] = $parentDict->value[$key];
unset($inheritedKeys[$index]);
}
}
/** @noinspection NotOptimalIfConditionsInspection */
if (isset($parentDict->value['Parent']) && \count($inheritedKeys) > 0) {
$parentDict = PdfType::resolve(PdfDictionary::get($parentDict, 'Parent'), $this->parser);
} else {
break;
}
}
}
}
if (isset($this->inheritedAttributes[$name])) {
return $this->inheritedAttributes[$name];
}
}
return null;
}
/**
* Get the rotation value.
*
* @return int
* @throws PdfParserException
* @throws PdfTypeException
* @throws CrossReferenceException
*/
public function getRotation()
{
$rotation = $this->getAttribute('Rotate');
if ($rotation === null) {
return 0;
}
$rotation = PdfNumeric::ensure(PdfType::resolve($rotation, $this->parser))->value % 360;
if ($rotation < 0) {
$rotation += 360;
}
return $rotation;
}
/**
* Get a boundary of this page.
*
* @param string $box
* @param bool $fallback
* @return bool|Rectangle
* @throws PdfParserException
* @throws PdfTypeException
* @throws CrossReferenceException
* @see PageBoundaries
*/
public function getBoundary($box = PageBoundaries::CROP_BOX, $fallback = \true)
{
$value = $this->getAttribute($box);
if ($value !== null) {
return Rectangle::byPdfArray($value, $this->parser);
}
if ($fallback === \false) {
return \false;
}
switch ($box) {
case PageBoundaries::BLEED_BOX:
case PageBoundaries::TRIM_BOX:
case PageBoundaries::ART_BOX:
return $this->getBoundary(PageBoundaries::CROP_BOX, \true);
case PageBoundaries::CROP_BOX:
return $this->getBoundary(PageBoundaries::MEDIA_BOX, \true);
}
return \false;
}
/**
* Get the width and height of this page.
*
* @param string $box
* @param bool $fallback
* @return array|bool
* @throws PdfParserException
* @throws PdfTypeException
* @throws CrossReferenceException
*/
public function getWidthAndHeight($box = PageBoundaries::CROP_BOX, $fallback = \true)
{
$boundary = $this->getBoundary($box, $fallback);
if ($boundary === \false) {
return \false;
}
$rotation = $this->getRotation();
$interchange = $rotation / 90 % 2;
return [$interchange ? $boundary->getHeight() : $boundary->getWidth(), $interchange ? $boundary->getWidth() : $boundary->getHeight()];
}
/**
* Get the raw content stream.
*
* @return string
* @throws PdfReaderException
* @throws PdfTypeException
* @throws FilterException
* @throws PdfParserException
*/
public function getContentStream()
{
$dict = $this->getPageDictionary();
$contents = PdfType::resolve(PdfDictionary::get($dict, 'Contents'), $this->parser);
if ($contents instanceof PdfNull) {
return '';
}
if ($contents instanceof PdfArray) {
$result = [];
foreach ($contents->value as $content) {
$content = PdfType::resolve($content, $this->parser);
if (!$content instanceof PdfStream) {
continue;
}
$result[] = $content->getUnfilteredStream();
}
return \implode("\n", $result);
}
if ($contents instanceof PdfStream) {
return $contents->getUnfilteredStream();
}
throw new PdfReaderException('Array or stream expected.', PdfReaderException::UNEXPECTED_DATA_TYPE);
}
/**
* Get information of all external links on this page.
*
* All coordinates are normalized in view to rotation and translation of the boundary-box, so that their
* origin is lower-left.
*
* @return array
* @throws CrossReferenceException
* @throws PdfParserException
* @throws PdfTypeException
*/
public function getExternalLinks($box = PageBoundaries::CROP_BOX)
{
$dict = $this->getPageDictionary();
$annotations = PdfType::resolve(PdfDictionary::get($dict, 'Annots'), $this->parser);
if (!$annotations instanceof PdfArray) {
return [];
}
$links = [];
foreach ($annotations->value as $entry) {
$annotation = PdfType::resolve($entry, $this->parser);
$value = PdfType::resolve(PdfDictionary::get($annotation, 'Subtype'), $this->parser);
if (!$value instanceof PdfName || $value->value !== 'Link') {
continue;
}
$dest = PdfType::resolve(PdfDictionary::get($annotation, 'Dest'), $this->parser);
if (!$dest instanceof PdfNull) {
continue;
}
$action = PdfType::resolve(PdfDictionary::get($annotation, 'A'), $this->parser);
if (!$action instanceof PdfDictionary) {
continue;
}
$actionType = PdfType::resolve(PdfDictionary::get($action, 'S'), $this->parser);
if (!$actionType instanceof PdfName || $actionType->value !== 'URI') {
continue;
}
$uri = PdfType::resolve(PdfDictionary::get($action, 'URI'), $this->parser);
if ($uri instanceof PdfString) {
$uriValue = PdfString::unescape($uri->value);
} elseif ($uri instanceof PdfHexString) {
$uriValue = \hex2bin($uri->value);
} else {
continue;
}
$rect = PdfType::resolve(PdfDictionary::get($annotation, 'Rect'), $this->parser);
if (!$rect instanceof PdfArray || \count($rect->value) !== 4) {
continue;
}
$rect = Rectangle::byPdfArray($rect, $this->parser);
if ($rect->getWidth() === 0 || $rect->getHeight() === 0) {
continue;
}
$bbox = $this->getBoundary($box);
$rotation = $this->getRotation();
$gs = new GraphicsState();
$gs->translate(-$bbox->getLlx(), -$bbox->getLly());
$gs->rotate($bbox->getLlx(), $bbox->getLly(), -$rotation);
switch ($rotation) {
case 90:
$gs->translate(-$bbox->getWidth(), 0);
break;
case 180:
$gs->translate(-$bbox->getWidth(), -$bbox->getHeight());
break;
case 270:
$gs->translate(0, -$bbox->getHeight());
break;
}
$normalizedRect = Rectangle::byVectors($gs->toUserSpace(new Vector($rect->getLlx(), $rect->getLly())), $gs->toUserSpace(new Vector($rect->getUrx(), $rect->getUry())));
$quadPoints = PdfType::resolve(PdfDictionary::get($annotation, 'QuadPoints'), $this->parser);
$normalizedQuadPoints = [];
if ($quadPoints instanceof PdfArray) {
$quadPointsCount = \count($quadPoints->value);
if ($quadPointsCount % 8 === 0) {
for ($i = 0; $i + 1 < $quadPointsCount; $i += 2) {
$x = PdfNumeric::ensure(PdfType::resolve($quadPoints->value[$i], $this->parser));
$y = PdfNumeric::ensure(PdfType::resolve($quadPoints->value[$i + 1], $this->parser));
$v = $gs->toUserSpace(new Vector($x->value, $y->value));
$normalizedQuadPoints[] = $v->getX();
$normalizedQuadPoints[] = $v->getY();
}
}
}
$links[] = ['rect' => $normalizedRect, 'quadPoints' => $normalizedQuadPoints, 'uri' => $uriValue, 'pdfObject' => $annotation];
}
return $links;
}
}

View File

@@ -0,0 +1,81 @@
<?php
/**
* This file is part of FPDI
*
* @package setasign\Fpdi
* @copyright Copyright (c) 2023 Setasign GmbH & Co. KG (https://www.setasign.com)
* @license http://opensource.org/licenses/mit-license The MIT License
*/
namespace WP_Ultimo\Dependencies\setasign\Fpdi\PdfReader;
/**
* An abstract class for page boundary constants and some helper methods
*/
abstract class PageBoundaries
{
/**
* MediaBox
*
* The media box defines the boundaries of the physical medium on which the page is to be printed.
*
* @see PDF 32000-1:2008 - 14.11.2 Page Boundaries
* @var string
*/
const MEDIA_BOX = 'MediaBox';
/**
* CropBox
*
* The crop box defines the region to which the contents of the page shall be clipped (cropped) when displayed or
* printed.
*
* @see PDF 32000-1:2008 - 14.11.2 Page Boundaries
* @var string
*/
const CROP_BOX = 'CropBox';
/**
* BleedBox
*
* The bleed box defines the region to which the contents of the page shall be clipped when output in a
* production environment.
*
* @see PDF 32000-1:2008 - 14.11.2 Page Boundaries
* @var string
*/
const BLEED_BOX = 'BleedBox';
/**
* TrimBox
*
* The trim box defines the intended dimensions of the finished page after trimming.
*
* @see PDF 32000-1:2008 - 14.11.2 Page Boundaries
* @var string
*/
const TRIM_BOX = 'TrimBox';
/**
* ArtBox
*
* The art box defines the extent of the pages meaningful content (including potential white space) as intended
* by the pages creator.
*
* @see PDF 32000-1:2008 - 14.11.2 Page Boundaries
* @var string
*/
const ART_BOX = 'ArtBox';
/**
* All page boundaries
*
* @var array
*/
public static $all = array(self::MEDIA_BOX, self::CROP_BOX, self::BLEED_BOX, self::TRIM_BOX, self::ART_BOX);
/**
* Checks if a name is a valid page boundary name.
*
* @param string $name The boundary name
* @return boolean A boolean value whether the name is valid or not.
*/
public static function isValidName($name)
{
return \in_array($name, self::$all, \true);
}
}

View File

@@ -0,0 +1,196 @@
<?php
/**
* This file is part of FPDI
*
* @package setasign\Fpdi
* @copyright Copyright (c) 2023 Setasign GmbH & Co. KG (https://www.setasign.com)
* @license http://opensource.org/licenses/mit-license The MIT License
*/
namespace WP_Ultimo\Dependencies\setasign\Fpdi\PdfReader;
use WP_Ultimo\Dependencies\setasign\Fpdi\PdfParser\CrossReference\CrossReferenceException;
use WP_Ultimo\Dependencies\setasign\Fpdi\PdfParser\PdfParser;
use WP_Ultimo\Dependencies\setasign\Fpdi\PdfParser\PdfParserException;
use WP_Ultimo\Dependencies\setasign\Fpdi\PdfParser\Type\PdfArray;
use WP_Ultimo\Dependencies\setasign\Fpdi\PdfParser\Type\PdfDictionary;
use WP_Ultimo\Dependencies\setasign\Fpdi\PdfParser\Type\PdfIndirectObject;
use WP_Ultimo\Dependencies\setasign\Fpdi\PdfParser\Type\PdfIndirectObjectReference;
use WP_Ultimo\Dependencies\setasign\Fpdi\PdfParser\Type\PdfNumeric;
use WP_Ultimo\Dependencies\setasign\Fpdi\PdfParser\Type\PdfType;
use WP_Ultimo\Dependencies\setasign\Fpdi\PdfParser\Type\PdfTypeException;
/**
* A PDF reader class
*/
class PdfReader
{
/**
* @var PdfParser
*/
protected $parser;
/**
* @var int
*/
protected $pageCount;
/**
* Indirect objects of resolved pages.
*
* @var PdfIndirectObjectReference[]|PdfIndirectObject[]
*/
protected $pages = [];
/**
* PdfReader constructor.
*
* @param PdfParser $parser
*/
public function __construct(PdfParser $parser)
{
$this->parser = $parser;
}
/**
* PdfReader destructor.
*/
public function __destruct()
{
if ($this->parser !== null) {
$this->parser->cleanUp();
}
}
/**
* Get the pdf parser instance.
*
* @return PdfParser
*/
public function getParser()
{
return $this->parser;
}
/**
* Get the PDF version.
*
* @return string
* @throws PdfParserException
*/
public function getPdfVersion()
{
return \implode('.', $this->parser->getPdfVersion());
}
/**
* Get the page count.
*
* @return int
* @throws PdfTypeException
* @throws CrossReferenceException
* @throws PdfParserException
*/
public function getPageCount()
{
if ($this->pageCount === null) {
$catalog = $this->parser->getCatalog();
$pages = PdfType::resolve(PdfDictionary::get($catalog, 'Pages'), $this->parser);
$count = PdfType::resolve(PdfDictionary::get($pages, 'Count'), $this->parser);
$this->pageCount = PdfNumeric::ensure($count)->value;
}
return $this->pageCount;
}
/**
* Get a page instance.
*
* @param int $pageNumber
* @return Page
* @throws PdfTypeException
* @throws CrossReferenceException
* @throws PdfParserException
* @throws \InvalidArgumentException
*/
public function getPage($pageNumber)
{
if (!\is_numeric($pageNumber)) {
throw new \InvalidArgumentException('Page number needs to be a number.');
}
if ($pageNumber < 1 || $pageNumber > $this->getPageCount()) {
throw new \InvalidArgumentException(\sprintf('Page number "%s" out of available page range (1 - %s)', $pageNumber, $this->getPageCount()));
}
$this->readPages();
$page = $this->pages[$pageNumber - 1];
if ($page instanceof PdfIndirectObjectReference) {
$readPages = function ($kids) use(&$readPages) {
$kids = PdfArray::ensure($kids);
/** @noinspection LoopWhichDoesNotLoopInspection */
foreach ($kids->value as $reference) {
$reference = PdfIndirectObjectReference::ensure($reference);
$object = $this->parser->getIndirectObject($reference->value);
$type = PdfDictionary::get($object->value, 'Type');
if ($type->value === 'Pages') {
return $readPages(PdfDictionary::get($object->value, 'Kids'));
}
return $object;
}
throw new PdfReaderException('Kids array cannot be empty.', PdfReaderException::KIDS_EMPTY);
};
$page = $this->parser->getIndirectObject($page->value);
$dict = PdfType::resolve($page, $this->parser);
$type = PdfDictionary::get($dict, 'Type');
if ($type->value === 'Pages') {
$kids = PdfType::resolve(PdfDictionary::get($dict, 'Kids'), $this->parser);
try {
$page = $this->pages[$pageNumber - 1] = $readPages($kids);
} catch (PdfReaderException $e) {
if ($e->getCode() !== PdfReaderException::KIDS_EMPTY) {
throw $e;
}
// let's reset the pages array and read all page objects
$this->pages = [];
$this->readPages(\true);
// @phpstan-ignore-next-line
$page = $this->pages[$pageNumber - 1];
}
} else {
$this->pages[$pageNumber - 1] = $page;
}
}
return new Page($page, $this->parser);
}
/**
* Walk the page tree and resolve all indirect objects of all pages.
*
* @param bool $readAll
* @throws CrossReferenceException
* @throws PdfParserException
* @throws PdfTypeException
*/
protected function readPages($readAll = \false)
{
if (\count($this->pages) > 0) {
return;
}
$expectedPageCount = $this->getPageCount();
$readPages = function ($kids, $count) use(&$readPages, $readAll, $expectedPageCount) {
$kids = PdfArray::ensure($kids);
$isLeaf = $count->value === \count($kids->value);
foreach ($kids->value as $reference) {
$reference = PdfIndirectObjectReference::ensure($reference);
if (!$readAll && $isLeaf) {
$this->pages[] = $reference;
continue;
}
$object = $this->parser->getIndirectObject($reference->value);
$type = PdfDictionary::get($object->value, 'Type');
if ($type->value === 'Pages') {
$readPages(PdfDictionary::get($object->value, 'Kids'), PdfDictionary::get($object->value, 'Count'));
} else {
$this->pages[] = $object;
}
// stop if all pages are read - faulty documents exists with additional entries with invalid data.
if (\count($this->pages) === $expectedPageCount) {
break;
}
}
};
$catalog = $this->parser->getCatalog();
$pages = PdfType::resolve(PdfDictionary::get($catalog, 'Pages'), $this->parser);
$count = PdfType::resolve(PdfDictionary::get($pages, 'Count'), $this->parser);
$kids = PdfType::resolve(PdfDictionary::get($pages, 'Kids'), $this->parser);
$readPages($kids, $count);
}
}

View File

@@ -0,0 +1,30 @@
<?php
/**
* This file is part of FPDI
*
* @package setasign\Fpdi
* @copyright Copyright (c) 2023 Setasign GmbH & Co. KG (https://www.setasign.com)
* @license http://opensource.org/licenses/mit-license The MIT License
*/
namespace WP_Ultimo\Dependencies\setasign\Fpdi\PdfReader;
use WP_Ultimo\Dependencies\setasign\Fpdi\FpdiException;
/**
* Exception for the pdf reader class
*/
class PdfReaderException extends FpdiException
{
/**
* @var int
*/
const KIDS_EMPTY = 0x101;
/**
* @var int
*/
const UNEXPECTED_DATA_TYPE = 0x102;
/**
* @var int
*/
const MISSING_DATA = 0x103;
}