PHP Класс Illuminate\Bus\Dispatcher

Наследование: implements Illuminate\Contracts\Bus\Dispatcher, implements Illuminate\Contracts\Bus\QueueingDispatcher, implements Illuminate\Contracts\Bus\HandlerResolver
Показать файл Открыть проект Примеры использования класса

Защищенные свойства (Protected)

Свойство Тип Описание
$container Illuminate\Contracts\Container\Container The container implementation.
$mapper Closure The fallback mapping Closure.
$mappings array All of the command-to-handler mappings.
$pipeline Illuminate\Pipeline\Pipeline The pipeline instance for the bus.
$pipes array The pipes to send commands through before dispatching.
$queueResolver Closure | null The queue resolver callback.

Открытые методы

Метод Описание
__construct ( Illuminate\Contracts\Container\Container $container, Closure $queueResolver = null ) : void Create a new command dispatcher instance.
dispatch ( mixed $command, Closure $afterResolving = null ) : mixed Dispatch a command to its appropriate handler.
dispatchFrom ( mixed $command, ArrayAccess $source, array $extras = [] ) : mixed Marshal a command and dispatch it to its appropriate handler.
dispatchFromArray ( mixed $command, array $array ) : mixed Marshal a command and dispatch it to its appropriate handler.
dispatchNow ( mixed $command, Closure $afterResolving = null ) : mixed Dispatch a command to its appropriate handler in the current process.
dispatchToQueue ( mixed $command ) : mixed Dispatch a command to its appropriate handler behind a queue.
getHandlerClass ( mixed $command ) : string Get the handler class for the given command.
getHandlerMethod ( mixed $command ) : string Get the handler method for the given command.
mapUsing ( Closure $mapper ) : void Register a fallback mapper callback.
maps ( array $commands ) : void Register command-to-handler mappings.
pipeThrough ( array $pipes ) Set the pipes through which commands should be piped before dispatching.
resolveHandler ( mixed $command ) : mixed Get the handler instance for the given command.
simpleMapping ( mixed $command, string $commandNamespace, string $handlerNamespace ) : string Map the command to a handler within a given root namespace.

Защищенные методы

Метод Описание
commandShouldBeQueued ( mixed $command ) : boolean Determine if the given command should be queued.
getMapperSegment ( mixed $command, integer $segment ) : string Get the given segment from a given class handler using the custom mapper.
getMappingSegment ( string $className, integer $segment ) : string Get the given segment from a given class handler.
getParameterValueForCommand ( string $command, ArrayAccess $source, ReflectionParameter $parameter, array $extras = [] ) : mixed Get a parameter value for a marshaled command.
inflectSegment ( mixed $command, integer $segment ) : string Get the given handler segment for the given command.
marshal ( string $command, ArrayAccess $source, array $extras = [] ) : mixed Marshal a command from the given array accessible object.
marshalFromArray ( string $command, array $array ) : mixed Marshal a command from the given array.
pushCommandToQueue ( Illuminate\Contracts\Queue\Queue $queue, mixed $command ) : mixed Push the command onto the given queue instance.

Описание методов

__construct() публичный метод

Create a new command dispatcher instance.
public __construct ( Illuminate\Contracts\Container\Container $container, Closure $queueResolver = null ) : void
$container Illuminate\Contracts\Container\Container
$queueResolver Closure
Результат void

commandShouldBeQueued() защищенный метод

Determine if the given command should be queued.
protected commandShouldBeQueued ( mixed $command ) : boolean
$command mixed
Результат boolean

dispatch() публичный метод

Dispatch a command to its appropriate handler.
public dispatch ( mixed $command, Closure $afterResolving = null ) : mixed
$command mixed
$afterResolving Closure
Результат mixed

dispatchFrom() публичный метод

Marshal a command and dispatch it to its appropriate handler.
public dispatchFrom ( mixed $command, ArrayAccess $source, array $extras = [] ) : mixed
$command mixed
$source ArrayAccess
$extras array
Результат mixed

dispatchFromArray() публичный метод

Marshal a command and dispatch it to its appropriate handler.
public dispatchFromArray ( mixed $command, array $array ) : mixed
$command mixed
$array array
Результат mixed

dispatchNow() публичный метод

Dispatch a command to its appropriate handler in the current process.
public dispatchNow ( mixed $command, Closure $afterResolving = null ) : mixed
$command mixed
$afterResolving Closure
Результат mixed

dispatchToQueue() публичный метод

Dispatch a command to its appropriate handler behind a queue.
public dispatchToQueue ( mixed $command ) : mixed
$command mixed
Результат mixed

getHandlerClass() публичный метод

Get the handler class for the given command.
public getHandlerClass ( mixed $command ) : string
$command mixed
Результат string

getHandlerMethod() публичный метод

Get the handler method for the given command.
public getHandlerMethod ( mixed $command ) : string
$command mixed
Результат string

getMapperSegment() защищенный метод

Get the given segment from a given class handler using the custom mapper.
protected getMapperSegment ( mixed $command, integer $segment ) : string
$command mixed
$segment integer
Результат string

getMappingSegment() защищенный метод

Get the given segment from a given class handler.
protected getMappingSegment ( string $className, integer $segment ) : string
$className string
$segment integer
Результат string

getParameterValueForCommand() защищенный метод

Get a parameter value for a marshaled command.
protected getParameterValueForCommand ( string $command, ArrayAccess $source, ReflectionParameter $parameter, array $extras = [] ) : mixed
$command string
$source ArrayAccess
$parameter ReflectionParameter
$extras array
Результат mixed

inflectSegment() защищенный метод

Get the given handler segment for the given command.
protected inflectSegment ( mixed $command, integer $segment ) : string
$command mixed
$segment integer
Результат string

mapUsing() публичный метод

Register a fallback mapper callback.
public mapUsing ( Closure $mapper ) : void
$mapper Closure
Результат void

maps() публичный метод

Register command-to-handler mappings.
public maps ( array $commands ) : void
$commands array
Результат void

marshal() защищенный метод

Marshal a command from the given array accessible object.
protected marshal ( string $command, ArrayAccess $source, array $extras = [] ) : mixed
$command string
$source ArrayAccess
$extras array
Результат mixed

marshalFromArray() защищенный метод

Marshal a command from the given array.
protected marshalFromArray ( string $command, array $array ) : mixed
$command string
$array array
Результат mixed

pipeThrough() публичный метод

Set the pipes through which commands should be piped before dispatching.
public pipeThrough ( array $pipes )
$pipes array

pushCommandToQueue() защищенный метод

Push the command onto the given queue instance.
protected pushCommandToQueue ( Illuminate\Contracts\Queue\Queue $queue, mixed $command ) : mixed
$queue Illuminate\Contracts\Queue\Queue
$command mixed
Результат mixed

resolveHandler() публичный метод

Get the handler instance for the given command.
public resolveHandler ( mixed $command ) : mixed
$command mixed
Результат mixed

simpleMapping() публичный статический метод

Map the command to a handler within a given root namespace.
public static simpleMapping ( mixed $command, string $commandNamespace, string $handlerNamespace ) : string
$command mixed
$commandNamespace string
$handlerNamespace string
Результат string

Описание свойств

$container защищенное свойство

The container implementation.
protected Container,Illuminate\Contracts\Container $container
Результат Illuminate\Contracts\Container\Container

$mapper защищенное свойство

The fallback mapping Closure.
protected Closure $mapper
Результат Closure

$mappings защищенное свойство

All of the command-to-handler mappings.
protected array $mappings
Результат array

$pipeline защищенное свойство

The pipeline instance for the bus.
protected Pipeline,Illuminate\Pipeline $pipeline
Результат Illuminate\Pipeline\Pipeline

$pipes защищенное свойство

The pipes to send commands through before dispatching.
protected array $pipes
Результат array

$queueResolver защищенное свойство

The queue resolver callback.
protected Closure|null $queueResolver
Результат Closure | null