PHP 클래스 lithium\template\view\adapter\File

For more information about implementing your own template loaders or renderers, see the lithium\template\View class.
또한 보기: lithium\template\View
또한 보기: lithium\template\view\Compiler
상속: extends lithium\template\view\Renderer
파일 보기 프로젝트 열기: unionofrad/lithium 1 사용 예제들

보호된 프로퍼티들

프로퍼티 타입 설명
$_autoConfig array These configuration variables will automatically be assigned to their corresponding protected properties when the object is initialized.
$_classes array File's dependencies. These classes are used by the output handlers to generate URLs for dynamic resources and static assets, as well as compiling the templates.
$_compile boolean Boolean flag indicating whether templates should be pre-compiled before inclusion. For more information on template compilation, see view\Compiler.
$_data array An array containing the variables currently in the scope of the template. These values are manipulable using array syntax against the template object, i.e. $this['foo'] = 'bar' inside your template files.
$_paths
$_vars Variables that have been set from a view/element/layout/etc. that should be available to the same rendering context.

공개 메소드들

메소드 설명
__construct ( array $config = [] ) : void Constructor.
offsetExists ( string $offset ) : boolean Allows checking to see if a value is set in template data.
offsetGet ( string $offset ) : mixed Gets the offset, or null in the template data.
offsetSet ( string $offset, mixed $value ) : void Sets the offset with the given value.
offsetUnset ( string $offset ) : void Unsets the given offset.
render ( string $template, array | string $data = [], array $options = [] ) : string Renders content from a template file provided by template().
template ( string $type, array $params ) : string Returns a template file name

보호된 메소드들

메소드 설명
_paths ( string $type, array $params ) : string Searches one or more path templates for a matching template file, and returns the file name.

메소드 상세

__construct() 공개 메소드

Constructor.
public __construct ( array $config = [] ) : void
$config array Configuration options.
리턴 void

_paths() 보호된 메소드

Searches one or more path templates for a matching template file, and returns the file name.
protected _paths ( string $type, array $params ) : string
$type string
$params array The set of options keys to be interpolated into the path templates when searching for the correct file to load.
리턴 string Returns the first template file found. Throws an exception if no templates are available.

offsetExists() 공개 메소드

Part of ArrayAccess. isset($file['bar']); $file->offsetExists('bar');
public offsetExists ( string $offset ) : boolean
$offset string Key / variable name to check.
리턴 boolean Returns `true` if the value is set, otherwise `false`.

offsetGet() 공개 메소드

Part of ArrayAccess. $file['bar']; $file->offsetGet('bar');
public offsetGet ( string $offset ) : mixed
$offset string Key / variable name to check.
리턴 mixed

offsetSet() 공개 메소드

Part of ArrayAccess. $file['bar'] = 'baz'; $file->offsetSet('bar', 'baz');
public offsetSet ( string $offset, mixed $value ) : void
$offset string Key / variable name to check.
$value mixed Value you wish to set to `$offset`.
리턴 void

offsetUnset() 공개 메소드

Part of ArrayAccess. unset($file['bar']); $file->offsetUnset('bar');
public offsetUnset ( string $offset ) : void
$offset string Key / variable name to check.
리턴 void

render() 공개 메소드

Renders content from a template file provided by template().
public render ( string $template, array | string $data = [], array $options = [] ) : string
$template string
$data array | string
$options array
리턴 string

template() 공개 메소드

Returns a template file name
public template ( string $type, array $params ) : string
$type string
$params array
리턴 string

프로퍼티 상세

$_autoConfig 보호되어 있는 프로퍼티

These configuration variables will automatically be assigned to their corresponding protected properties when the object is initialized.
protected array $_autoConfig
리턴 array

$_classes 보호되어 있는 프로퍼티

File's dependencies. These classes are used by the output handlers to generate URLs for dynamic resources and static assets, as well as compiling the templates.
또한 보기: Renderer::$_handlers
protected array $_classes
리턴 array

$_compile 보호되어 있는 프로퍼티

Boolean flag indicating whether templates should be pre-compiled before inclusion. For more information on template compilation, see view\Compiler.
또한 보기: lithium\template\view\Compiler
protected bool $_compile
리턴 boolean

$_data 보호되어 있는 프로퍼티

An array containing the variables currently in the scope of the template. These values are manipulable using array syntax against the template object, i.e. $this['foo'] = 'bar' inside your template files.
protected array $_data
리턴 array

$_paths 보호되어 있는 프로퍼티

protected $_paths

$_vars 보호되어 있는 프로퍼티

Variables that have been set from a view/element/layout/etc. that should be available to the same rendering context.
protected $_vars