@param CompilerPayload $payload

@return CompilerPayload
3272
public function compileGroupBy(CompilerPayload $payload)
    {
        $builder = $payload->getBuilder();

        if ($builder instanceof Clause\GroupByInterface && $builder->getGroupByClauses()) {
            $newSQL = 'GROUP BY ' . implode(', ', $builder->getGroupByClauses());
            $payload = $payload->appendSQL($newSQL);
        }

        if ($builder instanceof Clause\GroupByInterface && $builder->isGroupByWithRollUp()) {
            $payload = $payload->appendSQL('WITH ROLLUP');
        }

        return $payload;
    }
265511
public static function create(array $payload)
    {
        $referral = isset($payload['referral']) ? Referral::create($payload['referral']) : null;

        return new static($payload['payload'], $referral);
    }
864469
public function withData($data): PayloadInterface
    {
        if ($this->data === $data) {
            return $this;
        }

        $clone = clone $this;
        $clone->data = $data;

        return $clone;
    }
406491
public function compileUpdate(CompilerPayload $payload)
    {
        $builder = $payload->getBuilder();

        if ($builder instanceof UpdateBuilder) {
            $newSQL = $builder->isIgnore() ? 'UPDATE IGNORE' : 'UPDATE';
            $payload = $payload->updateSQL($newSQL);
        }

        return $payload;
    }
497758
public static function get($payload)
    {
        switch ($payload) {
            case 'OK':
            case 'QUEUED':
                if (isset(self::$$payload)) {
                    return self::$$payload;
                }

                return self::$$payload = new self($payload);

            default:
                return new self($payload);
        }
    }
318783
private function makeSignedJwt($payload) {
    $header = array('typ' => 'JWT', 'alg' => 'RS256');

    $segments = array(
      Google_Utils::urlSafeB64Encode(json_encode($header)),
      Google_Utils::urlSafeB64Encode(json_encode($payload))
    );

    $signingInput = implode('.', $segments);
    $signer = new Google_P12Signer($this->privateKey, $this->privateKeyPassword);
    $signature = $signer->sign($signingInput);
    $segments[] = Google_Utils::urlSafeB64Encode($signature);

    return implode(".", $segments);
  }
561693
public function verify(Payload $payload)
    {
        $response = $this->service->call($payload);

        $string = $response->getBody();

        $pattern = sprintf('/(%s|%s)/', self::IPN_VERIFIED, self::IPN_INVALID);

        if (!preg_match($pattern, $string)) {
            throw new UnexpectedValueException(
                sprintf('Unexpected verification status encountered: %s', $string)
            );
        }

        return $response;
    }
1204227
protected function parseEventAndPayload($event, $payload)
    {
        if (is_object($event)) {
            list($payload, $event) = [[$event], get_class($event)];
        }

        return [$event, array_wrap($payload)];
    }
799633
public function compileInsert(CompilerPayload $payload)
    {
        $builder = $payload->getBuilder();

        if ($builder instanceof AbstractInsertBuilder) {
            $actualSQL = 'INSERT INTO';
            $payload = $payload->updateSQL($actualSQL);
        }

        return $payload;
    }
997404
protected function _createRequest(
    ApiPayloadInterface $payload = null, $path = null, $verb = HttpVerb::POST
  )
  {
    return parent::_createRequest($payload, $path, $verb);
  }
71788
private function makeSignedJwt($payload) {
    $header = array('typ' => 'JWT', 'alg' => 'RS256');

    $segments = array(
      Utils::urlSafeB64Encode(json_encode($header)),
      Utils::urlSafeB64Encode(json_encode($payload))
    );
    $signingInput = implode('.', $segments);

    $signer = new P12Signer($this->privateKey, $this->privateKeyPassword);
    $signature = $signer->sign($signingInput);
    $segments[] = Utils::urlSafeB64Encode($signature);

    return implode(".", $segments);
  }
288484
public function getDataIdentifierForPayload($payload)
    {
        $resourceInformation = $this->findResourceInformation($payload);
        $resource = $resourceInformation->getResource($payload);

        return array(
            'type' => $this->exposableTypeMap->getType($resource->getType()),
            'id' => $resource->getId()
        );
    }
1369772
public function sendPayload($deviceToken, Payload $payload)
    {
        return $this->socketClient->write(
            $this->createApnMessage($deviceToken, $payload)->getBinaryMessage()
        );
    }
1362732
public function packPayload($payload)
    {
        $payload = JsonEncoder::jsonEncode($payload);

        /** @var APNSMessage $message */
        $message = $this->message;

        $recipientId = $message->getRecipientDeviceCollection()->current()->getIdentifier();

        $messageRecipientId = $this->notificationId . '_' . $recipientId;

        $packedPayload =
            pack('C', 1). // Command push
            pack('N', $messageRecipientId).
            pack('N', $message->getExpirationTime()->format('U')).
            pack('n', 32). // Token binary length
            pack('H*', $recipientId);
        pack('n', strlen($payload));

        $packedPayload .= $payload;

        return $packedPayload;
    }
1233539
public function triggerActionWithPayload(PostActionPayload $payload)
  {
    $endpoint = AffiliateActionEndpoint::bound($this->_getApi());
    $req = $endpoint->post($payload);
    $result = $this->_processRequest($req);

    if($payload->returnPixels)
    {
      /**
       * @var $result PostActionResponse
       */
      $this->_pixels = $result->pixels;
    }

    return $result;
  }
223336
function parseRequest( $payload )
    {
        if ( isset( $_SERVER['HTTP_SOAPACTION'] ) )
        {
            // this list of replacements built by testing different clients...
            // we should really parse the xml instead!
            $soapaction = trim( $_SERVER['HTTP_SOAPACTION'], '"' );
            $soapaction = preg_replace( array( '#^urn:#', '#^/*#', '#Action$#' ), '', $soapaction );
            $request = new ggPhpSOAPRequest( $soapaction );
            // this call is used to store the raw  xml in the request object
            $request->decodeStream( $payload );
            $request->setSoapVersion( 1 );
            return $request;
        }
        else
        {
            /*$request = new ggPhpSOAPRequest( '...' );
            $request->decodeStream( $payload );
            $request->setSoapVersion( 2 );
            return $request;*/
            return false;
        }
    }
856443
protected function processPipeClassName(string $pipe, $payload)
    {
        if (isset($this->container)) {
            $pinst = $this->container->get($pipe);
        }

        if (!isset($pinst)) {
            $pinst = new $pipe();
        }

        if (!$pinst instanceof PipeInterface) {
            throw new MissingPipeInterfaceException(get_class($pinst));
        }

        return $pinst($payload);
    }