class View implements ResponseInterface (View source)

Methods

void
__construct(array $config)

View constructor.

static void
configure(array $config)

Load view configuration

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

Parse the view

getTemplate()

Get the template engine instance

static View
getInstance()

Get the view singleton instance

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

Add a template engine

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

__callStatic

Tintin
getEngine()

Get the engine

setEngine(string $engine)

Set Engine

setExtension(string $extension)

No description

string
getContent()

Get rendering content

void
sendContent()

Send Response

bool
fileExists(string $filename)

Check if the define file exists

string
__toString()

__toString

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 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

static View getInstance()

Get the view singleton instance

Return Value

View

Exceptions

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

Add a template engine

Parameters

string $name
string $engine

Return Value

bool

Exceptions

ViewException

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

__callStatic

Parameters

string $name
array $arguments

Return Value

mixed

Tintin getEngine()

Get the engine

Return Value

Tintin

View setEngine(string $engine)

Set Engine

Parameters

string $engine

Return Value

View

View setExtension(string $extension)

No description

Parameters

string $extension

Return Value

View

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

mixed __call(string $method, array $arguments)

__call

Parameters

string $method
array $arguments

Return Value

mixed