ELP Parser API

PackageValidator
in package

Validate parsed project structure without making normal parsing strict.

Table of Contents

Methods

validate()  : array{valid: bool, errors: array>, warnings: array>}
Validate a parsed project.
findDuplicateIds()  : void
Find duplicate non-empty IDs.
validateIdentifiers()  : void
Validate identifiers and duplicate IDs.
validateIdeviceRuntimes()  : void
Report iDevice types used without a matching packaged runtime.
validateIdeviceState()  : void
Report iDevice state payloads that could not be decoded.
validateInternalLinks()  : void
Report internal exe-node links that target missing pages.
validateOrdersAndRelationships()  : void
Validate ordering and cross-reference consistency.
validatePackageBaseline()  : void
Validate expected package-level files as warnings.
validatePageHierarchy()  : void
Validate page-parent relationships and cycles.

Methods

validate()

Validate a parsed project.

public validate(ELPParser $parser) : array{valid: bool, errors: array>, warnings: array>}
Parameters
$parser : ELPParser

Parsed project.

Return values
array{valid: bool, errors: array>, warnings: array>}

findDuplicateIds()

Find duplicate non-empty IDs.

private findDuplicateIds(array<int, array<string, mixed>> $items, string $type, array<int, array<string, mixed>> &$errors) : void
Parameters
$items : array<int, array<string, mixed>>

Items to inspect.

$type : string

Item type.

$errors : array<int, array<string, mixed>>

Validation errors.

validateIdentifiers()

Validate identifiers and duplicate IDs.

private validateIdentifiers(ELPParser $parser, array<int, array<string, mixed>> &$errors, array<int, array<string, mixed>> &$warnings) : void
Parameters
$parser : ELPParser

Parsed project.

$errors : array<int, array<string, mixed>>

Validation errors.

$warnings : array<int, array<string, mixed>>

Validation warnings.

validateIdeviceRuntimes()

Report iDevice types used without a matching packaged runtime.

private validateIdeviceRuntimes(ELPParser $parser, array<int, array<string, mixed>> &$warnings) : void
Parameters
$parser : ELPParser

Parsed project.

$warnings : array<int, array<string, mixed>>

Validation warnings.

validateIdeviceState()

Report iDevice state payloads that could not be decoded.

private validateIdeviceState(ELPParser $parser, array<int, array<string, mixed>> &$warnings) : void
Parameters
$parser : ELPParser

Parsed project.

$warnings : array<int, array<string, mixed>>

Validation warnings.

Report internal exe-node links that target missing pages.

private validateInternalLinks(ELPParser $parser, array<int, array<string, mixed>> &$errors) : void
Parameters
$parser : ELPParser

Parsed project.

$errors : array<int, array<string, mixed>>

Validation errors.

validateOrdersAndRelationships()

Validate ordering and cross-reference consistency.

private validateOrdersAndRelationships(ELPParser $parser, array<int, array<string, mixed>> &$errors, array<int, array<string, mixed>> &$warnings) : void
Parameters
$parser : ELPParser

Parsed project.

$errors : array<int, array<string, mixed>>

Validation errors.

$warnings : array<int, array<string, mixed>>

Validation warnings.

validatePackageBaseline()

Validate expected package-level files as warnings.

private validatePackageBaseline(ELPParser $parser, array<int, array<string, mixed>> &$warnings) : void
Parameters
$parser : ELPParser

Parsed project.

$warnings : array<int, array<string, mixed>>

Validation warnings.

validatePageHierarchy()

Validate page-parent relationships and cycles.

private validatePageHierarchy(ELPParser $parser, array<int, array<string, mixed>> &$errors, array<int, array<string, mixed>> &$warnings) : void
Parameters
$parser : ELPParser

Parsed project.

$errors : array<int, array<string, mixed>>

Validation errors.

$warnings : array<int, array<string, mixed>>

Validation warnings.

On this page

Search results