import v1.1.0_beta1 | 2009-08-21

This commit is contained in:
2019-07-17 22:16:19 +02:00
parent 2c1152f0d3
commit 8dee6b1a10
2306 changed files with 251360 additions and 23428 deletions

View File

@ -18,10 +18,6 @@
* @license http://framework.zend.com/license/new-bsd New BSD License
*/
/** Zend_Pdf_Exception */
require_once 'Zend/Pdf/Exception.php';
/**
* Abstract utility class for parsing binary files.
*
@ -115,6 +111,7 @@ abstract class Zend_Pdf_FileParser
public function __construct(Zend_Pdf_FileParserDataSource $dataSource)
{
if ($dataSource->getSize() == 0) {
require_once 'Zend/Pdf/Exception.php';
throw new Zend_Pdf_Exception('The data source has not been properly initialized',
Zend_Pdf_Exception::BAD_DATA_SOURCE);
}
@ -229,6 +226,7 @@ abstract class Zend_Pdf_FileParser
public function readInt($size, $byteOrder = Zend_Pdf_FileParser::BYTE_ORDER_BIG_ENDIAN)
{
if (($size < 1) || ($size > 4)) {
require_once 'Zend/Pdf/Exception.php';
throw new Zend_Pdf_Exception("Invalid signed integer size: $size",
Zend_Pdf_Exception::INVALID_INTEGER_SIZE);
}
@ -274,6 +272,7 @@ abstract class Zend_Pdf_FileParser
}
}
} else {
require_once 'Zend/Pdf/Exception.php';
throw new Zend_Pdf_Exception("Invalid byte order: $byteOrder",
Zend_Pdf_Exception::INVALID_BYTE_ORDER);
}
@ -302,6 +301,7 @@ abstract class Zend_Pdf_FileParser
public function readUInt($size, $byteOrder = Zend_Pdf_FileParser::BYTE_ORDER_BIG_ENDIAN)
{
if (($size < 1) || ($size > 4)) {
require_once 'Zend/Pdf/Exception.php';
throw new Zend_Pdf_Exception("Invalid unsigned integer size: $size",
Zend_Pdf_Exception::INVALID_INTEGER_SIZE);
}
@ -320,6 +320,7 @@ abstract class Zend_Pdf_FileParser
$number |= ord($bytes[$i]) << ($i * 8);
}
} else {
require_once 'Zend/Pdf/Exception.php';
throw new Zend_Pdf_Exception("Invalid byte order: $byteOrder",
Zend_Pdf_Exception::INVALID_BYTE_ORDER);
}
@ -362,6 +363,7 @@ abstract class Zend_Pdf_FileParser
{
$bitsToRead = $mantissaBits + $fractionBits;
if (($bitsToRead % 8) !== 0) {
require_once 'Zend/Pdf/Exception.php';
throw new Zend_Pdf_Exception('Fixed-point numbers are whole bytes',
Zend_Pdf_Exception::BAD_FIXED_POINT_SIZE);
}
@ -413,6 +415,7 @@ abstract class Zend_Pdf_FileParser
}
return iconv('UTF-16LE', $characterSet, $bytes);
} else {
require_once 'Zend/Pdf/Exception.php';
throw new Zend_Pdf_Exception("Invalid byte order: $byteOrder",
Zend_Pdf_Exception::INVALID_BYTE_ORDER);
}