PHP 클래스 Xiaoler\Blade\Factory

파일 보기 프로젝트 열기: xiaoler/blade 1 사용 예제들

보호된 프로퍼티들

프로퍼티 타입 설명
$aliases array Array of registered view name aliases.
$engine Xiaoler\Blade\Engines\EngineInterface The engine implementation.
$finder Xiaoler\Blade\ViewFinderInterface The view finder implementation.
$loopsStack array The stack of in-progress loops.
$names array All of the registered view names.
$pushStack array The stack of in-progress push sections.
$pushes array All of the finished, captured push sections.
$renderCount integer The number of active rendering operations.
$sectionStack array The stack of in-progress sections.
$sections array All of the finished, captured sections.
$shared array Data that should be available to all templates.

공개 메소드들

메소드 설명
__construct ( Xiaoler\Blade\Engines\EngineInterface $engine, Xiaoler\Blade\ViewFinderInterface $finder ) : void Create a new view factory instance.
addLocation ( string $location ) : void Add a location to the array of view locations.
addLoop ( array | Countable $data ) : void Add new loop to the stack.
addNamespace ( string $namespace, string | array $hints ) : void Add a new namespace to the loader.
alias ( string $view, string $alias ) : void Add an alias for a view.
appendSection ( ) : string Stop injecting content into a section and append it.
decrementRender ( ) : void Decrement the rendering counter.
doneRendering ( ) : boolean Check if there are no active render operations.
exists ( string $view ) : boolean Determine if a given view exists.
file ( string $path, array $data = [], array $mergeData = [] ) : Xiaoler\Blade\View Get the evaluated view contents for the given view.
flushSections ( ) : void Flush all of the section contents.
flushSectionsIfDoneRendering ( ) : void Flush all of the section contents if done rendering.
getFinder ( ) : Xiaoler\Blade\ViewFinderInterface Get the view finder instance.
getFirstLoop ( ) : array Get an instance of the first loop in the stack.
getLoopStack ( ) : array Get the entire loop stack.
getNames ( ) : array Get all of the registered named views in environment.
getSections ( ) : array Get the entire array of sections.
getShared ( ) : array Get all of the shared data for the environment.
hasSection ( string $name ) : boolean Check if section exists.
incrementLoopIndices ( ) : void Increment the top loop's indices.
incrementRender ( ) : void Increment the rendering counter.
inject ( string $section, string $content ) : void Inject inline content into a section.
make ( string $view, array $data = [], array $mergeData = [] ) : Xiaoler\Blade\View Get the evaluated view contents for the given view.
name ( string $view, string $name ) : void Register a named view.
of ( string $view, mixed $data = [] ) : Xiaoler\Blade\View Get the evaluated view contents for a named view.
popLoop ( ) : void Pop a loop from the top of the loop stack.
prependNamespace ( string $namespace, string | array $hints ) : void Prepend a new namespace to the loader.
renderEach ( string $view, array $data, string $iterator, string $empty = 'raw|' ) : string Get the rendered contents of a partial from a loop.
setFinder ( Xiaoler\Blade\ViewFinderInterface $finder ) : void Set the view finder instance.
share ( array | string $key, mixed $value = null ) : mixed Add a piece of shared data to the environment.
shared ( string $key, mixed $default = null ) : mixed Get an item from the shared data.
startPush ( string $section, string $content = '' ) : void Start injecting content into a push section.
startSection ( string $section, string $content = '' ) : void Start injecting content into a section.
stopPush ( ) : string Stop injecting content into a push section.
stopSection ( boolean $overwrite = false ) : string Stop injecting content into a section.
yieldContent ( string $section, string $default = '' ) : string Get the string contents of a section.
yieldPushContent ( string $section, string $default = '' ) : string Get the string contents of a push section.
yieldSection ( ) : string Stop injecting content into a section and return its contents.

보호된 메소드들

메소드 설명
extendPush ( string $section, string $content ) : void Append content to a given push section.
extendSection ( string $section, string $content ) : void Append content to a given section.
normalizeName ( string $name ) : string Normalize a view name.

메소드 상세

__construct() 공개 메소드

Create a new view factory instance.
public __construct ( Xiaoler\Blade\Engines\EngineInterface $engine, Xiaoler\Blade\ViewFinderInterface $finder ) : void
$engine Xiaoler\Blade\Engines\EngineInterface
$finder Xiaoler\Blade\ViewFinderInterface
리턴 void

addLocation() 공개 메소드

Add a location to the array of view locations.
public addLocation ( string $location ) : void
$location string
리턴 void

addLoop() 공개 메소드

Add new loop to the stack.
public addLoop ( array | Countable $data ) : void
$data array | Countable
리턴 void

addNamespace() 공개 메소드

Add a new namespace to the loader.
public addNamespace ( string $namespace, string | array $hints ) : void
$namespace string
$hints string | array
리턴 void

alias() 공개 메소드

Add an alias for a view.
public alias ( string $view, string $alias ) : void
$view string
$alias string
리턴 void

appendSection() 공개 메소드

Stop injecting content into a section and append it.
public appendSection ( ) : string
리턴 string

decrementRender() 공개 메소드

Decrement the rendering counter.
public decrementRender ( ) : void
리턴 void

doneRendering() 공개 메소드

Check if there are no active render operations.
public doneRendering ( ) : boolean
리턴 boolean

exists() 공개 메소드

Determine if a given view exists.
public exists ( string $view ) : boolean
$view string
리턴 boolean

extendPush() 보호된 메소드

Append content to a given push section.
protected extendPush ( string $section, string $content ) : void
$section string
$content string
리턴 void

extendSection() 보호된 메소드

Append content to a given section.
protected extendSection ( string $section, string $content ) : void
$section string
$content string
리턴 void

file() 공개 메소드

Get the evaluated view contents for the given view.
public file ( string $path, array $data = [], array $mergeData = [] ) : Xiaoler\Blade\View
$path string
$data array
$mergeData array
리턴 Xiaoler\Blade\View

flushSections() 공개 메소드

Flush all of the section contents.
public flushSections ( ) : void
리턴 void

flushSectionsIfDoneRendering() 공개 메소드

Flush all of the section contents if done rendering.
public flushSectionsIfDoneRendering ( ) : void
리턴 void

getFinder() 공개 메소드

Get the view finder instance.
public getFinder ( ) : Xiaoler\Blade\ViewFinderInterface
리턴 Xiaoler\Blade\ViewFinderInterface

getFirstLoop() 공개 메소드

Get an instance of the first loop in the stack.
public getFirstLoop ( ) : array
리턴 array

getLoopStack() 공개 메소드

Get the entire loop stack.
public getLoopStack ( ) : array
리턴 array

getNames() 공개 메소드

Get all of the registered named views in environment.
public getNames ( ) : array
리턴 array

getSections() 공개 메소드

Get the entire array of sections.
public getSections ( ) : array
리턴 array

getShared() 공개 메소드

Get all of the shared data for the environment.
public getShared ( ) : array
리턴 array

hasSection() 공개 메소드

Check if section exists.
public hasSection ( string $name ) : boolean
$name string
리턴 boolean

incrementLoopIndices() 공개 메소드

Increment the top loop's indices.
public incrementLoopIndices ( ) : void
리턴 void

incrementRender() 공개 메소드

Increment the rendering counter.
public incrementRender ( ) : void
리턴 void

inject() 공개 메소드

Inject inline content into a section.
public inject ( string $section, string $content ) : void
$section string
$content string
리턴 void

make() 공개 메소드

Get the evaluated view contents for the given view.
public make ( string $view, array $data = [], array $mergeData = [] ) : Xiaoler\Blade\View
$view string
$data array
$mergeData array
리턴 Xiaoler\Blade\View

name() 공개 메소드

Register a named view.
public name ( string $view, string $name ) : void
$view string
$name string
리턴 void

normalizeName() 보호된 메소드

Normalize a view name.
protected normalizeName ( string $name ) : string
$name string
리턴 string

of() 공개 메소드

Get the evaluated view contents for a named view.
public of ( string $view, mixed $data = [] ) : Xiaoler\Blade\View
$view string
$data mixed
리턴 Xiaoler\Blade\View

popLoop() 공개 메소드

Pop a loop from the top of the loop stack.
public popLoop ( ) : void
리턴 void

prependNamespace() 공개 메소드

Prepend a new namespace to the loader.
public prependNamespace ( string $namespace, string | array $hints ) : void
$namespace string
$hints string | array
리턴 void

renderEach() 공개 메소드

Get the rendered contents of a partial from a loop.
public renderEach ( string $view, array $data, string $iterator, string $empty = 'raw|' ) : string
$view string
$data array
$iterator string
$empty string
리턴 string

setFinder() 공개 메소드

Set the view finder instance.
public setFinder ( Xiaoler\Blade\ViewFinderInterface $finder ) : void
$finder Xiaoler\Blade\ViewFinderInterface
리턴 void

share() 공개 메소드

Add a piece of shared data to the environment.
public share ( array | string $key, mixed $value = null ) : mixed
$key array | string
$value mixed
리턴 mixed

shared() 공개 메소드

Get an item from the shared data.
public shared ( string $key, mixed $default = null ) : mixed
$key string
$default mixed
리턴 mixed

startPush() 공개 메소드

Start injecting content into a push section.
public startPush ( string $section, string $content = '' ) : void
$section string
$content string
리턴 void

startSection() 공개 메소드

Start injecting content into a section.
public startSection ( string $section, string $content = '' ) : void
$section string
$content string
리턴 void

stopPush() 공개 메소드

Stop injecting content into a push section.
public stopPush ( ) : string
리턴 string

stopSection() 공개 메소드

Stop injecting content into a section.
public stopSection ( boolean $overwrite = false ) : string
$overwrite boolean
리턴 string

yieldContent() 공개 메소드

Get the string contents of a section.
public yieldContent ( string $section, string $default = '' ) : string
$section string
$default string
리턴 string

yieldPushContent() 공개 메소드

Get the string contents of a push section.
public yieldPushContent ( string $section, string $default = '' ) : string
$section string
$default string
리턴 string

yieldSection() 공개 메소드

Stop injecting content into a section and return its contents.
public yieldSection ( ) : string
리턴 string

프로퍼티 상세

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

Array of registered view name aliases.
protected array $aliases
리턴 array

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

The engine implementation.
protected EngineInterface,Xiaoler\Blade\Engines $engine
리턴 Xiaoler\Blade\Engines\EngineInterface

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

The view finder implementation.
protected ViewFinderInterface,Xiaoler\Blade $finder
리턴 Xiaoler\Blade\ViewFinderInterface

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

The stack of in-progress loops.
protected array $loopsStack
리턴 array

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

All of the registered view names.
protected array $names
리턴 array

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

The stack of in-progress push sections.
protected array $pushStack
리턴 array

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

All of the finished, captured push sections.
protected array $pushes
리턴 array

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

The number of active rendering operations.
protected int $renderCount
리턴 integer

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

The stack of in-progress sections.
protected array $sectionStack
리턴 array

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

All of the finished, captured sections.
protected array $sections
리턴 array

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

Data that should be available to all templates.
protected array $shared
리턴 array