MacroableTrait (Support\Traits)

MacroableTrait

trait MacroableTrait (View source)

Methods

static void macro(string $name, callable $macro)

Register a custom macro.

static boolean hasMacro(string $name)

Checks if macro is registered

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

Dynamically handle calls to the class.

mixed __call(string $method, array $parameters)

Dynamically handle calls to the class.

Details

static void macro(string $name, callable $macro)

Register a custom macro.

Parameters

string $name
callable $macro

Return Value

void

static boolean hasMacro(string $name)

Checks if macro is registered

Parameters

string $name

Return Value

boolean

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

Dynamically handle calls to the class.

Parameters

string $method
array $parameters

Return Value

mixed

Exceptions

BadMethodCallException

mixed __call(string $method, array $parameters)

Dynamically handle calls to the class.

Parameters

string $method
array $parameters

Return Value

mixed

Exceptions

BadMethodCallException

© Taylor Otwell
Licensed under the MIT License.
Laravel is a trademark of Taylor Otwell.
https://laravel.com/api/5.3/Illuminate/Support/Traits/MacroableTrait.html

在线笔记
App下载
App下载

扫描二维码

下载编程狮App

公众号
微信公众号

编程狮公众号

意见反馈
返回顶部