\Phug\Util\PartialMacroableTrait

Trait MacroableTrait.

Summary

Methods
Properties
Constants
macro()
hasMacro()
__callStatic()
__call()
No public properties found
No constants found
No protected methods found
$macros
N/A
No private methods found
No private properties found
N/A

Properties

$macros

$macros : array

The registered string macros.

Type

array

Methods

macro()

macro(string  $name, object|callable  $macro) : void

Register a custom macro.

Parameters

string $name
object|callable $macro

hasMacro()

hasMacro(string  $name) : boolean

Checks if macro is registered.

Parameters

string $name

Returns

boolean

__callStatic()

__callStatic(string  $method, array  $parameters) : mixed

Dynamically handle calls to the class.

Parameters

string $method
array $parameters

Throws

\BadMethodCallException

Returns

mixed

__call()

__call(string  $method, array  $parameters) : mixed

Dynamically handle calls to the class.

Parameters

string $method
array $parameters

Throws

\BadMethodCallException

Returns

mixed