a-blog cms PHP API Reference

InjectTemplate extends Singleton
in package

Table of Contents

Properties

$collection  : array<string, array<int, string|callable>>|null
type 名 → 登録エントリーの配列。
$instance  : object

Methods

add()  : void
テンプレート差し込み対象を登録する。
get()  : array<int, string|callable>
singleton()  : static

Properties

$collection

type 名 → 登録エントリーの配列。

protected array<string, array<int, string|callable>>|null $collection

エントリーは文字列パス (旧 API) または callable (Twig 等で組み立てた HTML を 返すクロージャ) のいずれか。順序は登録順を保つ。

Methods

add()

テンプレート差し込み対象を登録する。

public add(string $type, string|callable $entry) : void
Parameters
$type : string
$entry : string|callable

テンプレートファイルへの絶対 / 相対パス、 または HTML を返す callable。

get()

public get(string $type) : array<int, string|callable>
Parameters
$type : string
Return values
array<int, string|callable>

singleton()

public static singleton() : static
Tags
static
Return values
static

        
On this page

Search results