src/mako/redis/Redis.php
public function pipeline(Closure $pipeline): array
	{
		// Enable pipelining

		$this->pipelined = true;

		// Build commands

		$pipeline($this);

		// Send all commands to server and fetch responses

		$responses = [];

		$commands = count($this->commands);

		$this->sendCommandToServer(implode('', $this->commands));

		for($i = 0; $i < $commands; $i++)
		{
			$responses[] = $this->getResponse();
		}

		// Reset pipelining

		$this->commands = [];

		$this->pipelined = false;

		// Return array of responses

		return $responses;
	}
public function pipeline(Closure $pipeline): array
	{
		// Enable pipelining

		$this->pipelined = true;

		// Build commands

		$pipeline($this);

		// Send all commands to server and fetch responses

		$responses = [];

		$commands = count($this->commands);

		$this->sendCommandToServer(implode('', $this->commands));

		for($i = 0; $i < $commands; $i++)
		{
			$responses[] = $this->getResponse();
		}

		// Reset pipelining

		$this->commands = [];

		$this->pipelined = false;

		// Return array of responses

		return $responses;
	}
public function pipeline ( Closure $ pipeline ) : array { // Enable pipelining $ this -> pipelined = true ; // Build commands $ pipeline ( $ this ) ; // Send all commands to server and fetch responses $ responses = [ ] ; $ commands = count ( $ this -> commands ) ; $ this -> sendCommandToServer ( implode ( '' , $ this -> commands ) ) ; for ( $ i = 0 ; $ i < $ commands ; $ i ++ ) { $ responses [ ] = $ this -> getResponse ( ) ; } // Reset pipelining $ this -> commands = [ ] ; $ this -> pipelined = false ; // Return array of responses return $ responses ; }
Pipeline commands.

@param  \Closure $pipeline Pipelined commands
@return array
Pipeline commands .