src/Pipeline/Pipeline.php
public function execute($callable = null)
    {
        if ($callable && !is_callable($callable)) {
            throw new \InvalidArgumentException('The argument must be a callable object.');
        }

        $exception = null;
        $this->setRunning(true);

        try {
            if ($callable) {
                call_user_func($callable, $this);
            }

            $this->flushPipeline();
        } catch (\Exception $exception) {
            // NOOP
        }

        $this->setRunning(false);

        if ($exception) {
            throw $exception;
        }

        return $this->responses;
    }
public function execute($callable = null)
    {
        if ($callable && !is_callable($callable)) {
            throw new \InvalidArgumentException('The argument must be a callable object.');
        }

        $exception = null;
        $this->setRunning(true);

        try {
            if ($callable) {
                call_user_func($callable, $this);
            }

            $this->flushPipeline();
        } catch (\Exception $exception) {
            // NOOP
        }

        $this->setRunning(false);

        if ($exception) {
            throw $exception;
        }

        return $this->responses;
    }
public function execute ( $ callable = null ) { if ( $ callable && ! is_callable ( $ callable ) ) { throw new \ InvalidArgumentException ( 'The argument must be a callable object.' ) ; } $ exception = null ; $ this -> setRunning ( true ) ; try { if ( $ callable ) { call_user_func ( $ callable , $ this ) ; } $ this -> flushPipeline ( ) ; } catch ( \ Exception $ exception ) { // NOOP } $ this -> setRunning ( false ) ; if ( $ exception ) { throw $ exception ; } return $ this -> responses ; }
Handles the actual execution of the whole pipeline.

@param mixed $callable Optional callback for execution.

@throws \Exception
@throws \InvalidArgumentException

@return array
Handles the actual execution of the whole pipeline .