PhpView
class PhpView implements ViewInterface (View source)
Render a view file with php.
Traits
Methods
mixed
getContext(string|null $key = null, mixed|null $default = null)
Get context values.
from HasContextTrait
with(string|array $key, mixed $value = null)
Add context values.
from HasContextTrait
string
getFilepath()
Get filepath.
setFilepath(string $filepath)
Set filepath.
ViewInterface|null
getLayout()
Get layout.
string
toString()
Render the view to a string.
ResponseInterface
toResponse()
Convert to Psr\Http\Message\ResponseInterface.
Details
in HasNameTrait at line 25
string
getName()
Get name.
in HasNameTrait at line 35
HasNameTrait
setName(string $name)
Set name.
in HasContextTrait at line 29
mixed
getContext(string|null $key = null, mixed|null $default = null)
Get context values.
in HasContextTrait at line 44
HasContextTrait
with(string|array $key, mixed $value = null)
Add context values.
at line 48
__construct(PhpViewEngine $engine)
Constructor.
at line 57
string
getFilepath()
Get filepath.
at line 77
ViewInterface|null
getLayout()
Get layout.
at line 87
PhpView
setLayout(ViewInterface|null $layout)
Set layout.
at line 96
string
toString()
Render the view to a string.
at line 118
ResponseInterface
toResponse()
Convert to Psr\Http\Message\ResponseInterface.