Pdf/FileParserDataSource/String.php
Zend Framework
LICENSE
This source file is subject to the new BSD license that is bundled
with this package in the file LICENSE.txt.
It is also available through the world-wide-web at this URL:
http://framework.zend.com/license/new-bsd
If you did not receive a copy of the license and are unable to
obtain it through the world-wide-web, please send an email
to license@zend.com so we can send you a copy immediately.
- Category
- Zend
- Copyright
- Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com)
- License
- New BSD License
- Package
- Zend_Pdf
- Subpackage
- FileParser
- Version
- $Id$
\Zend_Pdf_FileParserDataSource_String
Package: Zend_Pdf\FileParser
Returns
Throws
Concrete subclass of {@link Zend_Pdf_FileParserDataSource} that provides an
interface to binary strings.
Concrete subclasses allow for parsing of in-memory, filesystem, and other
sources through a common API. These subclasses also take care of error
handling and other mundane tasks.
Subclasses must implement at minimum {@link __construct()},
{@link __destruct()}, {@link readBytes()}, and {@link readAllBytes()}.
Subclasses should also override {@link moveToOffset()} and
{@link __toString()} as appropriate.
- Parent(s)
- \Zend_Pdf_FileParserDataSource
- Copyright
- Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com)
- License
- New BSD License
Properties
Methods
__construct(string $string) : void
Object constructor.
Verifies that the string is not empty.
ParametersName | Type | Description |
---|---|---|
$string | string | String to parse. |
__toString() : string
Returns a string containing the parsed string's length.
Returns
Type | Description |
---|---|
string |
readAllBytes() : string
Returns the entire string.
Preserves the current read position.
ReturnsType | Description |
---|---|
string |
readBytes(integer $byteCount) : string
Returns the specified number of raw bytes from the string at the byte offset of the current read position.
Advances the read position by the number of bytes read.
Throws an exception if there is insufficient data to completely fulfill
the request.
ParametersName | Type | Description |
---|---|---|
$byteCount | integer | Number of bytes to read. |
Type | Description |
---|---|
string |
Exception | Description |
---|---|
\Zend_Pdf_Exception |