Skip to content

API reference / Quittio \ Core \ Support

Macroable

trait in quittio/core

Quittio\Core\Support\Macroable · Source

Lightweight macro support without a dependency on Laravel. Country packs use it to add helpers such as smallAmount() to the invoice builder.

Properties#

PropertyTypeDescription
$macros protected staticarray<string, callable>

Methods#

MethodDescription
->__call()
::flushMacros()
::hasMacro()
::macro()

__call()#

public function __call(string $method, array<mixed> $parameters): mixed
ParameterTypeDescription
$methodstring
$parametersarray<mixed>
Returns
mixed

flushMacros()#

public static function flushMacros(): void

static

hasMacro()#

public static function hasMacro(string $name): bool

static

ParameterTypeDescription
$namestring
Returns
bool

macro()#

public static function macro(string $name, callable $macro): void

static

ParameterTypeDescription
$namestring
$macrocallable

The open core packages are MIT licensed. The legal wording of the country packs must be confirmed by a tax adviser.