PHP 클래스 Jade\Jade

상속: extends Jade\Engine\Keywords
파일 보기 프로젝트 열기: kylekatarnls/jade-php 1 사용 예제들

보호된 프로퍼티들

프로퍼티 타입 설명
$filters array Built-in filters.
$sharedVariables array
$streamName string

공개 메소드들

메소드 설명
__construct ( array $options = [] ) Merge local options with constructor $options.
compile ( string $input, string $filename = null ) : string Compile PHP code from a Pug input or a Pug file.
render ( $input, $filename = null, array $vars = [] ) : string Compile HTML code from a Pug input or a Pug file.
requirements ( $name = null ) : array | boolean Returns list of requirements in an array identified by keys.
resetSharedVariables ( ) Remove all previously set shared variables.
share ( $variables, mixed $value = null ) Add a variable or an array of variables to be shared with all templates that will be rendered by the instance of Pug.
stream ( $input ) : string Create a stream wrapper to allow the possibility to add $scope variables.

보호된 메소드들

메소드 설명
whiteListNeeded ( $extension ) : boolean Returns true if suhosin extension is loaded and the stream name is missing in the executor include whitelist.

메소드 상세

__construct() 공개 메소드

Merge local options with constructor $options.
public __construct ( array $options = [] )
$options array

compile() 공개 메소드

Compile PHP code from a Pug input or a Pug file.
public compile ( string $input, string $filename = null ) : string
$input string input file (or input content if filenname is specified or no file found)
$filename string filename for the input code
리턴 string

render() 공개 메소드

Compile HTML code from a Pug input or a Pug file.
public render ( $input, $filename = null, array $vars = [] ) : string
$vars array
리턴 string

requirements() 공개 메소드

For each of them, the value can be true if the requirement is fullfilled, false else. If a requirement name is specified, returns only the matching boolean value for this requirement.
public requirements ( $name = null ) : array | boolean
리턴 array | boolean

resetSharedVariables() 공개 메소드

Remove all previously set shared variables.

share() 공개 메소드

Add a variable or an array of variables to be shared with all templates that will be rendered by the instance of Pug.
public share ( $variables, mixed $value = null )
$value mixed if you pass an array as first argument, the second argument will be ignored, else it will used as the variable value for the variable name you passed as first argument

stream() 공개 메소드

Create a stream wrapper to allow the possibility to add $scope variables.
public stream ( $input ) : string
리턴 string

whiteListNeeded() 보호된 메소드

Returns false in any other case.
protected whiteListNeeded ( $extension ) : boolean
리턴 boolean

프로퍼티 상세

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

Built-in filters.
protected array $filters
리턴 array

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

protected array $sharedVariables
리턴 array

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

protected string $streamName
리턴 string