class View implements ResponseInterface (View source)

Methods

void
__construct(array $config)

View constructor.

static void
configure(array $config)

Load view configuration

static View
getInstance()

Get the view singleton instance

static View
parse(string $view, array $data = [])

Parse the view

getTemplate()

Get the template engine instance

setEngine(string $engine)

Set Engine

void
cachable(bool $cachabled)

Set the availability of caching system

setExtension(string $extension)

No description

static bool
pushEngine(string $name, string $engine)

Ajouter un moteur de template

string
getContent()

Get rendering content

void
sendContent()

Send Response

bool
fileExists(string $filename)

Check if the define file exists

string
__toString()

__toString

static mixed
__callStatic(string $name, array $arguments)

__callStatic

mixed
__call(string $method, array $arguments)

__call

Details

void __construct(array $config)

View constructor.

Parameters

array $config

Return Value

void

Exceptions

ViewException

static void configure(array $config)

Load view configuration

Parameters

array $config

Return Value

void

static View getInstance()

Get the view singleton instance

Return Value

View

Exceptions

static View parse(string $view, array $data = [])

Parse the view

Parameters

string $view
array $data

Return Value

View

EngineAbstract getTemplate()

Get the template engine instance

Return Value

EngineAbstract

View setEngine(string $engine)

Set Engine

Parameters

string $engine

Return Value

View

void cachable(bool $cachabled)

Set the availability of caching system

Parameters

bool $cachabled

Return Value

void

View setExtension(string $extension)

No description

Parameters

string $extension

Return Value

View

static bool pushEngine(string $name, string $engine)

Ajouter un moteur de template

Parameters

string $name
string $engine

Return Value

bool

Exceptions

ViewException

string getContent()

Get rendering content

Return Value

string

void sendContent()

Send Response

Return Value

void

bool fileExists(string $filename)

Check if the define file exists

Parameters

string $filename

Return Value

bool

string __toString()

__toString

Return Value

string

static mixed __callStatic(string $name, array $arguments)

__callStatic

Parameters

string $name
array $arguments

Return Value

mixed

mixed __call(string $method, array $arguments)

__call

Parameters

string $method
array $arguments

Return Value

mixed