src/Client.php
protected function createPipeline(array $options = null, $callable = null)
    {
        if (isset($options['atomic']) && $options['atomic']) {
            $class = 'Predis\Pipeline\Atomic';
        } elseif (isset($options['fire-and-forget']) && $options['fire-and-forget']) {
            $class = 'Predis\Pipeline\FireAndForget';
        } else {
            $class = 'Predis\Pipeline\Pipeline';
        }

        /*
         * @var ClientContextInterface
         */
        $pipeline = new $class($this);

        if (isset($callable)) {
            return $pipeline->execute($callable);
        }

        return $pipeline;
    }
protected function createPipeline(array $options = null, $callable = null)
    {
        if (isset($options['atomic']) && $options['atomic']) {
            $class = 'Predis\Pipeline\Atomic';
        } elseif (isset($options['fire-and-forget']) && $options['fire-and-forget']) {
            $class = 'Predis\Pipeline\FireAndForget';
        } else {
            $class = 'Predis\Pipeline\Pipeline';
        }

        /*
         * @var ClientContextInterface
         */
        $pipeline = new $class($this);

        if (isset($callable)) {
            return $pipeline->execute($callable);
        }

        return $pipeline;
    }
protected function createPipeline ( array $ options = null , $ callable = null ) { if ( isset ( $ options [ 'atomic' ] ) && $ options [ 'atomic' ] ) { $ class = 'Predis\Pipeline\Atomic' ; } elseif ( isset ( $ options [ 'fire-and-forget' ] ) && $ options [ 'fire-and-forget' ] ) { $ class = 'Predis\Pipeline\FireAndForget' ; } else { $ class = 'Predis\Pipeline\Pipeline' ; } /*
         * @var ClientContextInterface
         */ $ pipeline = new $ class ( $ this ) ; if ( isset ( $ callable ) ) { return $ pipeline -> execute ( $ callable ) ; } return $ pipeline ; }
Actual pipeline context initializer method.

@param array $options  Options for the context.
@param mixed $callable Optional callable used to execute the context.

@return Pipeline|array
Actual pipeline context initializer method .