API Documentation

SourceFile extends ProjectFile
in package

File abstraction for a project source file.

Tags
see
FileCollection

Table of Contents

Properties

$pageClass  : HydePage>
The associated page class string.
$path  : string

Methods

__construct()  : mixed
arraySerialize()  : array<string|int, mixed>
Recursively serialize Arrayables
getAbsolutePath()  : string
getContents()  : string
getExtension()  : string
getName()  : string
getPath()  : string
jsonSerialize()  : array<string|int, mixed>
make()  : static
toArray()  : array{name: string, path: string}
Get the instance as an array.
toJson()  : string
automaticallySerialize()  : array<string|int, mixed>
Automatically serialize all public properties.

Properties

$pageClass read-only

The associated page class string.

public HydePage> $pageClass

$path read-only

public string $path

The path relative to the project root.

Tags
example

_pages/index.blade.php

example

_media/logo.png

Methods

__construct()

public __construct(string $path[, HydePage> $pageClass = HydePage::class ]) : mixed
Parameters
$path : string
$pageClass : HydePage> = HydePage::class

arraySerialize()

Recursively serialize Arrayables

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

getAbsolutePath()

public getAbsolutePath() : string
Return values
string

getContents()

public getContents() : string
Return values
string

getExtension()

public getExtension() : string
Return values
string

getName()

public getName() : string
Return values
string

getPath()

public getPath() : string
Return values
string

jsonSerialize()

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

make()

public static make(string $path[, HydePage> $pageClass = HydePage::class ]) : static
Parameters
$path : string
$pageClass : HydePage> = HydePage::class
Return values
static

toArray()

Get the instance as an array.

public toArray() : array{name: string, path: string}
Return values
array{name: string, path: string}

toJson()

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

automaticallySerialize()

Automatically serialize all public properties.

protected automaticallySerialize() : array<string|int, mixed>
Return values
array<string|int, mixed>

        
On this page

Search results