PHP Class Smalot\PdfParser\Header

Mostra file Open project: smalot/pdfparser Class Usage Examples

Protected Properties

Property Type Description
$document Document
$elements Smalot\PdfParser\Element[]

Public Methods

Method Description
__construct ( Smalot\PdfParser\Element[] $elements = [], Document $document = null )
get ( string $name ) : Smalot\PdfParser\Element | Smalot\PdfParser\Object
getDetails ( boolean $deep = true ) : array
getElementTypes ( ) : array Used only for debug.
getElements ( ) : mixed Returns all elements.
has ( string $name ) : boolean Indicate if an element name is available in header.
parse ( string $content, Document $document, integer &$position ) : Header

Protected Methods

Method Description
resolveXRef ( string $name ) : Smalot\PdfParser\Element | Smalot\PdfParser\Object Resolve XRef to object.

Method Details

__construct() public method

public __construct ( Smalot\PdfParser\Element[] $elements = [], Document $document = null )
$elements Smalot\PdfParser\Element[] List of elements.
$document Document Document.

get() public method

public get ( string $name ) : Smalot\PdfParser\Element | Smalot\PdfParser\Object
$name string
return Smalot\PdfParser\Element | Smalot\PdfParser\Object

getDetails() public method

public getDetails ( boolean $deep = true ) : array
$deep boolean
return array

getElementTypes() public method

Used only for debug.
public getElementTypes ( ) : array
return array

getElements() public method

Returns all elements.
public getElements ( ) : mixed
return mixed

has() public method

Indicate if an element name is available in header.
public has ( string $name ) : boolean
$name string The name of the element
return boolean

parse() public static method

public static parse ( string $content, Document $document, integer &$position ) : Header
$content string The content to parse
$document Document The document
$position integer The new position of the cursor after parsing
return Header

resolveXRef() protected method

Resolve XRef to object.
protected resolveXRef ( string $name ) : Smalot\PdfParser\Element | Smalot\PdfParser\Object
$name string
return Smalot\PdfParser\Element | Smalot\PdfParser\Object

Property Details

$document protected_oe property

protected Document,Smalot\PdfParser $document
return Document

$elements protected_oe property

protected Element[],Smalot\PdfParser $elements
return Smalot\PdfParser\Element[]