Cell
in package
implements
Stringable
uses
PropertiesTrait
Class Cell
The base class that View Cells should extend. Provides extended features for managing/rendering a single cell's contents.
Tags
Table of Contents
Interfaces
- Stringable
Properties
- $view : string
- The name of the view to render.
Methods
- __toString() : string
- Provides capability to render on string casting.
- fill() : $this
- Attempts to set the values of public class properties.
- getNonPublicProperties() : array<string|int, mixed>
- Get the protected and private properties of the class and return as an array.
- getPublicProperties() : array<string|int, mixed>
- Get the public properties of the class and return as an array.
- render() : string
- Responsible for converting the view into HTML.
- setView() : $this
- Sets the view to use when rendered.
- view() : string
- Actually renders the view, and returns the HTML.
- includeComputedProperties() : array<string|int, mixed>
- Allows the developer to define computed properties as methods with `get` prefixed to the protected/private property name.
Properties
$view
The name of the view to render.
protected
string
$view
= ''
If empty, will be determined based on the cell class' name.
Methods
__toString()
Provides capability to render on string casting.
public
__toString() : string
Return values
stringfill()
Attempts to set the values of public class properties.
public
final fill(array<string|int, mixed> $params) : $this
Parameters
- $params : array<string|int, mixed>
Return values
$thisgetNonPublicProperties()
Get the protected and private properties of the class and return as an array.
public
final getNonPublicProperties() : array<string|int, mixed>
Return values
array<string|int, mixed>getPublicProperties()
Get the public properties of the class and return as an array.
public
final getPublicProperties() : array<string|int, mixed>
Return values
array<string|int, mixed>render()
Responsible for converting the view into HTML.
public
render() : string
Expected to be overridden by the child class in many occasions, but not all.
Return values
stringsetView()
Sets the view to use when rendered.
public
setView(string $view) : $this
Parameters
- $view : string
Return values
$thisview()
Actually renders the view, and returns the HTML.
protected
final view(string|null $view[, array<string|int, mixed> $data = [] ]) : string
In order to provide access to public properties and methods from within the view, this method extracts $data into the current scope and captures the output buffer instead of relying on the view service.
Parameters
- $view : string|null
- $data : array<string|int, mixed> = []
Tags
Return values
stringincludeComputedProperties()
Allows the developer to define computed properties as methods with `get` prefixed to the protected/private property name.
private
includeComputedProperties(array<string|int, mixed> $properties) : array<string|int, mixed>
Parameters
- $properties : array<string|int, mixed>