ELP Parser API

ProjectInspector
in package

FinalYes

Read lightweight project metadata without normalizing pages, iDevices or assets.

Table of Contents

Properties

$archiveLimits  : ArchiveLimits
$archiveReader  : ArchiveReader
$filePath  : string

Methods

__construct()  : mixed
inspect()  : array<string, mixed>
Inspect project identity, format and core metadata.
inspectLegacy()  : array<string, mixed>
Inspect a legacy contentv3 package without normalizing its page tree.
inspectModern()  : array<string, mixed>
Inspect a modern ODE package.
legacyDictionaryValue()  : string
Read one top-level legacy dictionary value by key.
readKeyValueNodes()  : array<string, string>
Convert ODE key/value nodes to an associative array.
xpath()  : array<int, SimpleXMLElement>
Execute XPath with the default namespace mapped to x.

Properties

Methods

__construct()

public __construct(string $filePath[, ArchiveLimits|null $limits = null ]) : mixed
Parameters
$filePath : string

Project file path.

$limits : ArchiveLimits|null = null

Optional archive safety limits.

inspect()

Inspect project identity, format and core metadata.

public inspect() : array<string, mixed>
Return values
array<string, mixed>

inspectLegacy()

Inspect a legacy contentv3 package without normalizing its page tree.

private inspectLegacy(array<int, string> $entries, string $extension) : array<string, mixed>
Parameters
$entries : array<int, string>

Archive entries.

$extension : string

Source extension.

Return values
array<string, mixed>

inspectModern()

Inspect a modern ODE package.

private inspectModern(SimpleXMLElement $xml, array<int, string> $entries, string $extension, bool $hasRootDtd) : array<string, mixed>
Parameters
$xml : SimpleXMLElement

Parsed XML.

$entries : array<int, string>

Archive entries.

$extension : string

Source extension.

$hasRootDtd : bool

Whether content.dtd exists at archive root.

Return values
array<string, mixed>

legacyDictionaryValue()

Read one top-level legacy dictionary value by key.

private legacyDictionaryValue(SimpleXMLElement $xml, string $key) : string
Parameters
$xml : SimpleXMLElement

XML document.

$key : string

Legacy dictionary key.

Return values
string

readKeyValueNodes()

Convert ODE key/value nodes to an associative array.

private readKeyValueNodes(array<int, SimpleXMLElement$nodes) : array<string, string>
Parameters
$nodes : array<int, SimpleXMLElement>

Nodes to read.

Return values
array<string, string>

xpath()

Execute XPath with the default namespace mapped to x.

private xpath(SimpleXMLElement $node, string $path) : array<int, SimpleXMLElement>
Parameters
$node : SimpleXMLElement

XML node.

$path : string

XPath expression.

Return values
array<int, SimpleXMLElement>
On this page

Search results