Fb2Parser
in package
Table of Contents
Properties
- $binary : array<string|int, mixed>|null
- $body : array<string|int, mixed>|null
- $contents : array<string|int, mixed>
- $cover : string|null
- $description : Fb2MetaDescription|null
- $path : string
- $root : string|null
- $xml : XmlReader
Methods
- getBinary() : array<string|int, Fb2MetaBinaryItem>
- getBody() : array<string|int, mixed>|null
- getContents() : array<string|int, mixed>
- getCover() : string|null
- getDescription() : Fb2MetaDescription|null
- getRoot() : string|null
- make() : self
- __construct() : mixed
- buildBinaryItems() : array<string|int, Fb2MetaBinaryItem>
- buildContainer() : self
- buildDocument() : Fb2MetaDescriptionDocument|null
- buildPublish() : Fb2MetaDescriptionPublish|null
- buildTitle() : Fb2MetaDescriptionTitle|null
- findCover() : string|null
- parseAuthor() : array<string|int, Fb2MetaAuthor>
- parseMetadata() : array<string|int, mixed>
Properties
$binary
protected
array<string|int, mixed>|null
$binary
= null
$body
protected
array<string|int, mixed>|null
$body
= null
$contents
protected
array<string|int, mixed>
$contents
= []
$cover
protected
string|null
$cover
= null
$description
protected
Fb2MetaDescription|null
$description
= null
$path
protected
string
$path
$root
protected
string|null
$root
= null
$xml
protected
XmlReader
$xml
Methods
getBinary()
public
getBinary() : array<string|int, Fb2MetaBinaryItem>
Return values
array<string|int, Fb2MetaBinaryItem>getBody()
public
getBody() : array<string|int, mixed>|null
Return values
array<string|int, mixed>|nullgetContents()
public
getContents() : array<string|int, mixed>
Return values
array<string|int, mixed>getCover()
public
getCover() : string|null
Return values
string|nullgetDescription()
public
getDescription() : Fb2MetaDescription|null
Return values
Fb2MetaDescription|nullgetRoot()
public
getRoot() : string|null
Return values
string|nullmake()
public
static make(string $path) : self
Parameters
- $path : string
Return values
self__construct()
protected
__construct(string $path, XmlReader $xml[, string|null $root = null ][, array<string|int, mixed> $contents = [] ][, Fb2MetaDescription|null $description = null ][, array<string|int, mixed>|null $body = null ][, array<string|int, Fb2MetaBinaryItem> $binary = null ][, string|null $cover = null ]) : mixed
Parameters
- $path : string
- $xml : XmlReader
- $root : string|null = null
- $contents : array<string|int, mixed> = []
- $description : Fb2MetaDescription|null = null
- $body : array<string|int, mixed>|null = null
- $binary : array<string|int, Fb2MetaBinaryItem> = null
- $cover : string|null = null
buildBinaryItems()
private
buildBinaryItems(array<string|int, mixed> $binary) : array<string|int, Fb2MetaBinaryItem>
Parameters
- $binary : array<string|int, mixed>
Return values
array<string|int, Fb2MetaBinaryItem>buildContainer()
private
buildContainer() : self
Return values
selfbuildDocument()
private
buildDocument(mixed $documentInfo) : Fb2MetaDescriptionDocument|null
Parameters
- $documentInfo : mixed
Return values
Fb2MetaDescriptionDocument|nullbuildPublish()
private
buildPublish(mixed $publishInfo) : Fb2MetaDescriptionPublish|null
Parameters
- $publishInfo : mixed
Return values
Fb2MetaDescriptionPublish|nullbuildTitle()
private
buildTitle(mixed $titleInfo) : Fb2MetaDescriptionTitle|null
Parameters
- $titleInfo : mixed
Return values
Fb2MetaDescriptionTitle|nullfindCover()
private
findCover() : string|null
Return values
string|nullparseAuthor()
private
parseAuthor(mixed $author) : array<string|int, Fb2MetaAuthor>
Parameters
- $author : mixed
Return values
array<string|int, Fb2MetaAuthor>parseMetadata()
private
parseMetadata() : array<string|int, mixed>
Return values
array<string|int, mixed> —{titleInfo: array, documentInfo: array, publishInfo: array}