API Documentation

CoreDataObject
in package
implements SerializableContract Uses Serializable

FinalYes

Data class to contain the core data for a page being constructed.

It should contain immutable data known at the very start of construction. In addition to the front matter and markdown, the data should contain everything needed to identify the unique page being constructed.

The benefit of using this class over passing around the page object when constructing a page is that the latter's state is unpredictable due to the nature of the construction process continuously mutating the page object. This class on the other hand is immutable, making it highly predictable.

Table of Contents

Interfaces

SerializableContract

Properties

$identifier  : string
$markdown  : Markdown|false
$matter  : FrontMatter
$outputPath  : string
$pageClass  : string
$routeKey  : string
$sourcePath  : string

Methods

__construct()  : mixed
arraySerialize()  : array<string|int, mixed>
Recursively serialize Arrayables
jsonSerialize()  : array<string|int, mixed>
toArray()  : array{pageClass: string, identifier: string, sourcePath: string, outputPath: string, routeKey: string}
toJson()  : string

Properties

Methods

__construct()

public __construct(FrontMatter $matter, Markdown|false $markdown, string $pageClass, string $identifier, string $sourcePath, string $outputPath, string $routeKey) : mixed
Parameters
$matter : FrontMatter
$markdown : Markdown|false
$pageClass : string
$identifier : string
$sourcePath : string
$outputPath : string
$routeKey : string

arraySerialize()

Recursively serialize Arrayables

public arraySerialize() : array<string|int, mixed>
Return values
array<string|int, mixed>

jsonSerialize()

public jsonSerialize() : array<string|int, mixed>
Tags
inheritDoc
Return values
array<string|int, mixed>

toArray()

public toArray() : array{pageClass: string, identifier: string, sourcePath: string, outputPath: string, routeKey: string}
Return values
array{pageClass: string, identifier: string, sourcePath: string, outputPath: string, routeKey: string}

toJson()

public toJson([int $options = 0 ]) : string
Parameters
$options : int = 0
Return values
string

        
On this page

Search results