Process pipe class object

@param object $pipe
@param mixed $payload
@return mixed
@throws MissingPipeInterfaceException
973114
protected function processPipeObject(object $pipe, $payload)
    {
        if (!$pipe instanceof PipeInterface) {
            throw new MissingPipeInterfaceException(get_class($pipe));
        }
        return $pipe($payload);
    }
763582
function parseRequest( $payload )
    {
        $request = new ggRESTRequest();
        if ( $request->decodeStream( $payload ) )
        {
            $this->ResponseType = $request->responseType();
            $this->JsonpCallback = $request->jsonpCallback();
            return $request;
        }
        else
        {
            $this->ResponseType = '';
            return false;
        }
    }
1118741
protected function createSlice($stack, $pipe)
    {
        return function ($passable) use ($stack, $pipe)
        {
            try {
                return $this->call($pipe, $passable, $stack);
            }
            catch (Exception $e) {
                return $this->handleException($passable, $e);
            }
            catch (Throwable $e) {
                return $this->handleException($passable, new FatalThrowableError($e));
            }
        };
    }
979838
public function pipe($middleware, ?int $priority = 1, ?string $before = null)
    {
        if(is_object($middleware)) {
            $class = get_class($middleware);
        } else if(is_string($middleware) && class_exists($middleware)) {
            $class = $middleware;
        }
        if(isset($class) && ! isset($this->middlewareClasses[$class])) {
            $this->middlewareClasses[$class] = $middleware;
        }

        $this->getMiddlewareGroup()->addMiddleware($middleware, $priority, $before);
    }
1065565
final public function process($payload)
    {
        $payload = $this->processor->processStack($payload, $this->stack);

        if ( $this->next instanceof PipeChainInterface ) {
            $payload = $this->next->process($payload);
        }

        return $payload;
    }
516833
protected function parsePayload($payload)
    {
        $database = 0;
        $client = null;

        $pregCallback = function ($matches) use (&$database, &$client) {
            if (2 === $count = \count($matches)) {
                // Redis <= 2.4
                $database = (int) $matches[1];
            }

            if (4 === $count) {
                // Redis >= 2.6
                $database = (int) $matches[2];
                $client = $matches[3];
            }

            return ' ';
        };

        $event = \preg_replace_callback('/ \(db (\d+)\) | \[(\d+) (.*?)\] /', $pregCallback, $payload, 1);
        @list($timestamp, $command, $arguments) = \explode(' ', $event, 3);

        return (object) [
            'timestamp' => (float) $timestamp,
            'database'  => $database,
            'client'    => $client,
            'command'   => \substr($command, 1, -1),
            'arguments' => $arguments,
        ];
    }
1162133
protected function createSlice($stack, $pipe)
    {
        return function ($passable) use ($stack, $pipe)
        {
            return $this->call($pipe, $passable, $stack);
        };
    }
671643
protected function parsePipeData($pipe)
    {
        if (is_array($pipe)) {
            if (!$pipe[0]) {
                throw  new Exception('I need to know name of service (class)');
            }
            $name = $pipe[0];
            $method = $pipe[1];
            $parameters = $pipe[2];
            $needContainer = $pipe[3];
        } else {
            list($name, $method, $parameters) = array_pad(explode(':', $pipe, 3), 3, null);
            $needContainer = null;
        }

        if (is_string($parameters)) {
            $parameters = explode(',', $parameters);
        }

        return [$name, $method, $parameters, $needContainer];
    }
1223272
protected function call($pipe, $passable, $stack)
    {
        if ($pipe instanceof Closure) {
            return call_user_func($pipe, $passable, $stack);
        }

        // The pipe is not a Closure instance.
        else if (! is_object($pipe)) {
            list($name, $parameters) = $this->parsePipeString($pipe);

            $pipe = $this->getContainer()->make($name);

            $parameters = array_merge(array($passable, $stack), $parameters);
        } else {
            $parameters = array($passable, $stack);
        }

        return call_user_func_array(array($pipe, $this->method), $parameters);
    }
997404
protected function _createRequest(
    ApiPayloadInterface $payload = null, $path = null, $verb = HttpVerb::POST
  )
  {
    return parent::_createRequest($payload, $path, $verb);
  }
1208961
private function queryPayload($payload, $path = null)
    {
        if(is_null($path)) return $payload;

        if(array_key_exists($path, $payload)) {
            return $payload[$path];
        }

        $dotData = Arr::dot($payload);
        if(array_key_exists($path, $dotData)) {
            return $dotData[$path];
        }

        return null;
    }
624781
protected function storeJobReference($pipe, $key, JobPayload $payload)
    {
        $pipe->zadd($key, str_replace(',', '.', microtime(true) * -1), $payload->id());
    }
845635
public function process(Payload $payload) {
		$output = array();
		$command = $this->getCommand();
		// run composer update
		$this->invokeShellCommand($command, $output);
		$payload->getResponse()->addOutputFromPlugin($this, $output);
	}
1296930
function buildPayload(&$payload)
    {
        if (is_array($payload)) {
            $payload = $this->array_map_deep($payload, array($this, 'buildPayloadItemInfo'));
        } else {
            $payload = $this->makePayloadBuilder($payload);
            $this->buildPayload($payload);
        }

        return $payload;
    }
169303
public function process(Payload $payload) {
		$directory = $this->getDirectorySettingOrFail();
		$branch = $this->getSettingValue(self::OPTION_BRANCH, $payload->getRepository()->getMasterBranch());
		$url = $this->getSettingValue(self::OPTION_REPOSITORY, $payload->getRepository()->getUrl());
		$git = $this->resolveGitCommand();
		$command = array(
			'cd', escapeshellarg($directory), '&&',
			$git, self::COMMAND, escapeshellarg($url), escapeshellarg($branch)
		);
		if (TRUE === (boolean) $this->getSettingValue(self::OPTION_REBASE, FALSE)) {
			$command[] = self::COMMAND_REBASE;
		}
		$output = $this->executeGitCommand($command);
		$payload->getResponse()->addOutputFromPlugin($this, $output);
	}
1048987
public function encode(Payload $payload)
    {
        $token = $this->provider->encode($payload->get());

        return new Token($token);
    }
588866
public function pipe($object, $pipeline = null)
    {
        $pipeline = $pipeline ?: 'default';

        return call_user_func(
            $this->pipelines[$pipeline], new Pipeline($this->container), $object
        );
    }