trait CompilesComponents

Constants

protected COMPONENT_HASH_STACK_CONTEXT_KEY

The component name hash stack.

Methods

string
compileComponent(string $expression)

Compile the component statements into valid PHP.

static string
newComponentHash(string $component)

Get a new component hash for a component name.

static string
compileClassComponentOpening(string $component, string $alias, string $data, string $hash)

Compile a class component opening.

string
compileEndComponent()

Compile the end-component statements into valid PHP.

string
compileEndComponentClass()

Compile the end-component statements into valid PHP.

string
popComponentHashStack()

Pop the latest component hash from the stack.

string
compileSlot(string $expression)

Compile the slot statements into valid PHP.

string
compileEndSlot()

Compile the end-slot statements into valid PHP.

string
compileComponentFirst(string $expression)

Compile the component-first statements into valid PHP.

string
compileEndComponentFirst()

Compile the end-component-first statements into valid PHP.

string
compileProps(string $expression)

Compile the prop statement into valid PHP.

string
compileAware(string $expression)

Compile the aware statement into valid PHP.

static mixed
sanitizeComponentAttribute(mixed $value)

Sanitize the given component attribute value.

Details

at line 23
protected string compileComponent(string $expression)

Compile the component statements into valid PHP.

Parameters

string $expression

Return Value

string

at line 45
static string newComponentHash(string $component)

Get a new component hash for a component name.

Parameters

string $component

Return Value

string

at line 61
static string compileClassComponentOpening(string $component, string $alias, string $data, string $hash)

Compile a class component opening.

Parameters

string $component
string $alias
string $data
string $hash

Return Value

string

at line 76
protected string compileEndComponent()

Compile the end-component statements into valid PHP.

Return Value

string

at line 84
string compileEndComponentClass()

Compile the end-component statements into valid PHP.

Return Value

string

at line 104
protected string popComponentHashStack()

Pop the latest component hash from the stack.

Return Value

string

at line 118
protected string compileSlot(string $expression)

Compile the slot statements into valid PHP.

Parameters

string $expression

Return Value

string

at line 126
protected string compileEndSlot()

Compile the end-slot statements into valid PHP.

Return Value

string

at line 134
protected string compileComponentFirst(string $expression)

Compile the component-first statements into valid PHP.

Parameters

string $expression

Return Value

string

at line 142
protected string compileEndComponentFirst()

Compile the end-component-first statements into valid PHP.

Return Value

string

at line 150
protected string compileProps(string $expression)

Compile the prop statement into valid PHP.

Parameters

string $expression

Return Value

string

at line 186
protected string compileAware(string $expression)

Compile the aware statement into valid PHP.

Parameters

string $expression

Return Value

string

at line 197
static mixed sanitizeComponentAttribute(mixed $value)

Sanitize the given component attribute value.

Parameters

mixed $value

Return Value

mixed