Server IP : / Your IP : 10.244.4.16 [ Web Server : nginx/1.25.3 System : Linux escuela-portal-app-54f56585bc-kst6g 5.15.0-1084-azure #93-Ubuntu SMP Sat Mar 15 14:12:29 UTC 2025 x86_64 User : root ( 0) PHP Version : 8.2.13 Disable Function : pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals, Domains : 0 Domains MySQL : OFF | cURL : ON | WGET : OFF | Perl : ON | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : /proc/789/cwd/app/vendor/laravel/framework/src/Illuminate/Events/ |
Upload File : |
<?php namespace Illuminate\Events; use Closure; use Laravel\SerializableClosure\SerializableClosure; class QueuedClosure { /** * The underlying Closure. * * @var \Closure */ public $closure; /** * The name of the connection the job should be sent to. * * @var string|null */ public $connection; /** * The name of the queue the job should be sent to. * * @var string|null */ public $queue; /** * The number of seconds before the job should be made available. * * @var \DateTimeInterface|\DateInterval|int|null */ public $delay; /** * All of the "catch" callbacks for the queued closure. * * @var array */ public $catchCallbacks = []; /** * Create a new queued closure event listener resolver. * * @param \Closure $closure * @return void */ public function __construct(Closure $closure) { $this->closure = $closure; } /** * Set the desired connection for the job. * * @param string|null $connection * @return $this */ public function onConnection($connection) { $this->connection = $connection; return $this; } /** * Set the desired queue for the job. * * @param string|null $queue * @return $this */ public function onQueue($queue) { $this->queue = $queue; return $this; } /** * Set the desired delay in seconds for the job. * * @param \DateTimeInterface|\DateInterval|int|null $delay * @return $this */ public function delay($delay) { $this->delay = $delay; return $this; } /** * Specify a callback that should be invoked if the queued listener job fails. * * @param \Closure $closure * @return $this */ public function catch(Closure $closure) { $this->catchCallbacks[] = $closure; return $this; } /** * Resolve the actual event listener callback. * * @return \Closure */ public function resolve() { return function (...$arguments) { dispatch(new CallQueuedListener(InvokeQueuedClosure::class, 'handle', [ 'closure' => new SerializableClosure($this->closure), 'arguments' => $arguments, 'catch' => collect($this->catchCallbacks)->map(function ($callback) { return new SerializableClosure($callback); })->all(), ]))->onConnection($this->connection)->onQueue($this->queue)->delay($this->delay); }; } }