class Handler (View source)

Represent a generic handler - a Closure or a class method to be resolved from the service container

Methods

__construct(GenericFactory $factory, string|array|Closure $raw_handler, string $default_method = '', string $namespace = '')

Constructor

array|Closure
get()

Get the parsed handler

object
make()

Make an instance of the handler.

mixed
execute()

Execute the parsed handler with any provided arguments and return the result.

Details

__construct(GenericFactory $factory, string|array|Closure $raw_handler, string $default_method = '', string $namespace = '')

Constructor

Parameters

GenericFactory $factory
string|array|Closure $raw_handler
string $default_method
string $namespace

array|Closure get()

Get the parsed handler

Return Value

array|Closure

object make()

Make an instance of the handler.

Return Value

object

mixed execute()

Execute the parsed handler with any provided arguments and return the result.

Return Value

mixed