PHP 클래스 Bolt\Render

- Calls twig's render - Stores a page in cache, if needed - Store template (partials) in cache, if needed - Fetches pages or template (partials) from cache
저자: Bob den Otter, [email protected]
파일 보기 프로젝트 열기: bolt/bolt 1 사용 예제들

공개 프로퍼티들

프로퍼티 타입 설명
$app
$safe boolean
$twigKey string

공개 메소드들

메소드 설명
__construct ( Silex\Application $app, boolean $safe = false ) Set up the object.
hasTemplate ( string $template ) : boolean Check if the template exists.
postProcess ( Request $request, Response $response ) Post-process the rendered HTML: insert the snippets, and stuff.
render ( string $templateFile, array $context = [], array $globals = [] ) : TemplateResponse Render a template, possibly store it in cache. Or, if applicable, return the cached result.

메소드 상세

__construct() 공개 메소드

Set up the object.
public __construct ( Silex\Application $app, boolean $safe = false )
$app Silex\Application
$safe boolean

hasTemplate() 공개 메소드

Check if the template exists.
public hasTemplate ( string $template ) : boolean
$template string The name of the template.
리턴 boolean

postProcess() 공개 메소드

Post-process the rendered HTML: insert the snippets, and stuff.
public postProcess ( Request $request, Response $response )
$request Symfony\Component\HttpFoundation\Request
$response Symfony\Component\HttpFoundation\Response

render() 공개 메소드

Render a template, possibly store it in cache. Or, if applicable, return the cached result.
public render ( string $templateFile, array $context = [], array $globals = [] ) : TemplateResponse
$templateFile string Template file name
$context array Context variables
$globals array Global variables
리턴 Bolt\Response\TemplateResponse

프로퍼티 상세

$app 공개적으로 프로퍼티

public $app

$safe 공개적으로 프로퍼티

public bool $safe
리턴 boolean

$twigKey 공개적으로 프로퍼티

public string $twigKey
리턴 string