a-blog cms PHP API Reference

Twig extends Facade
in package

Table of Contents

Properties

$container  : Container
$instance  : mixed

Methods

__callStatic()  : mixed
addExtension()  : void
addFunction()  : void
addTemplatePath()  : void
clearCache()  : void
getInstance()  : mixed
get service instance
load()  : void
registerExtension()  : void
registerFilter()  : void
registerFunction()  : void
render()  : string
renderTemplate()  : string
setContainer()  : void
getServiceAlias()  : string
getServiceInstance()  : mixed
isCache()  : bool

Properties

$instance

protected static mixed $instance

Methods

__callStatic()

public static __callStatic(string $method, array<string|int, mixed> $arguments) : mixed
Parameters
$method : string
$arguments : array<string|int, mixed>

addExtension()

public static addExtension(AbstractExtension $extension) : void

拡張機能を追加 (既存 API)

Parameters
$extension : AbstractExtension

addFunction()

public static addFunction(string $name, callable $function) : void

関数を追加 (既存 API)

Parameters
$name : string
$function : callable

addTemplatePath()

public static addTemplatePath(string $dir[, string|null $namespace = = 'null' ]) : void

拡張側のテンプレートディレクトリを名前空間付きで登録

Parameters
$dir : string
$namespace : string|null = = 'null'

clearCache()

public static clearCache() : void

Twig コンパイル済みキャッシュをクリア

getInstance()

get service instance

public static getInstance() : mixed

load()

public static load(string $path, string $theme) : void

twigテンプレートをロード

Parameters
$path : string
$theme : string

registerExtension()

public static registerExtension(AbstractExtension $extension) : void

拡張側の Twig Extension を登録 (Environment 構築時に attach)

Parameters
$extension : AbstractExtension

registerFilter()

public static registerFilter(string $name, callable $callable[, array<string|int, mixed> $options = = '[]' ]) : void

拡張側の Filter を登録

Parameters
$name : string
$callable : callable
$options : array<string|int, mixed> = = '[]'

registerFunction()

public static registerFunction(string $name, callable $callable[, array<string|int, mixed> $options = = '[]' ]) : void

拡張側の Function を登録

Parameters
$name : string
$callable : callable
$options : array<string|int, mixed> = = '[]'

render()

public static render() : string

テンプレートをレンダリング

Return values
string

renderTemplate()

public static renderTemplate(string $name[, array<string|int, mixed> $context = = '[]' ]) : string

名前指定でテンプレートをレンダリング

Parameters
$name : string
$context : array<string|int, mixed> = = '[]'
Return values
string

getServiceAlias()

protected static getServiceAlias() : string
Return values
string

getServiceInstance()

protected static getServiceInstance(string $alias) : mixed
Parameters
$alias : string

isCache()

protected static isCache() : bool
Return values
bool

        
On this page

Search results