@param mixed $payload

@return FinallyResult|null
191572
public function handle($payload = null)
    {
        if ($decrypted = $this->app['request']->get('echostr')) {
            $str = $this->app['encryptor_corp']->decrypt(
                $decrypted,
                $this->app['request']->get('msg_signature'),
                $this->app['request']->get('nonce'),
                $this->app['request']->get('timestamp')
            );

            return new FinallyResult($str);
        }
        //把SuiteTicket缓存起来
        if (!empty($payload['SuiteTicket'])) {
            $this->app['suite_ticket']->setTicket($payload['SuiteTicket']);
        }
    }
129156
public function pushRaw($payload, $queue = null, array $options = [])
    {
        $this->getConnection()->eval(
            LuaScripts::push(), 2, $this->getQueue($queue),
            $this->getQueue($queue).':notify', $payload
        );

        return json_decode($payload, true)['id'] ?? null;
    }
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;
    }
1097485
public function pushRaw($payload, $queue = null, array $options = [])
    {
        $this->getConnection()->rPush($this->getQueue($queue), $payload);

        return Arr::get(json_decode($payload, true), 'id');
    }
1136393
protected function normalize($payload)
    {
        $data = get_object_vars($payload);
        foreach ($data as $k => $v) {
            if ($v instanceof \DateTime) {
                $payload->$k = $v->format('c');
                continue;
            }
            if (is_object($v)) {
                $payload->$k = $this->normalize($v);
                continue;
            }
        }
        return $payload;
    }
48093
public function recreate($payload, $queue = null, $delay)
    {
        $options = array('delay' => $this->getSeconds($delay));

        return $this->pushRaw($payload, $queue, $options);
    }
1259415
public function execute($action, array $payload)
    {
        $executor = $this->getExecutor($action);

        // dispatch pre event, listeners may change the payload here
        $event = new ExecutionEvent($executor, $action, $payload);
        $this->dispatcher->dispatch(WorkerEvents::PRE_EXECUTE_ACTION, $event);

        try {
            $resolver = $this->getPayloadResolver($executor);
            $payload  = $resolver->resolve($event->getPayload());
        } catch (ExceptionInterface $exception) {
            $this->logger->error(
                sprintf(
                    'Payload %s for "%s" is invalid: %s',
                    json_encode($payload, JSON_UNESCAPED_SLASHES),
                    $action,
                    $exception->getMessage()
                )
            );

            return false;
        }

        $result = $executor->execute($payload);
        // dispatch post event, listeners may change the result here
        $event->setResult($result);
        $this->dispatcher->dispatch(WorkerEvents::POST_EXECUTE_ACTION, $event);

        return $event->getResult();
    }
1050593
protected function fireCacheEvent( $event, $payload )
	{
		if ( !isset( $this->events ) )
			return null;

		switch ( $event )
		{
			case 'hit':
				if ( count( $payload ) == 2 )
					$payload[] = [];

				return $this->events->fire( new Events\CacheHit( $payload[0], $payload[1], $payload[2] ) );
			case 'missed':
				if ( count( $payload ) == 1 )
					$payload[] = [];

				return $this->events->fire( new Events\CacheMissed( $payload[0], $payload[1] ) );
			case 'delete':
				if ( count( $payload ) == 1 )
					$payload[] = [];

				return $this->events->fire( new Events\KeyForgotten( $payload[0], $payload[1] ) );
			case 'write':
				if ( count( $payload ) == 3 )
					$payload[] = [];

				return $this->events->fire( new Events\KeyWritten( $payload[0], $payload[1], $payload[2], $payload[3] ) );
		}
		return null;
	}
243360
public function handle($payload)
    {
        $data = json_decode($payload, true) ?: [];
        $events = (array)@$data['events'];
        $results = [];

        try {
            foreach ($events as $event) {
                $input = $this->captureInput($event);
                $command = $this->registry->findCommand($input);
                $command->input = $input;

                $results[] = $this->commandBus->handle($command);
            }
        } catch (DerailException $e) {
            $results[] = $this->handler->handle($e->command);
        } catch (\Exception $e) {
            $results[] = sprintf('ERROR: %s', $e->getMessage());
        }

        return $results;
    }
355804
public function parse($payload)
    {
        if ($payload) {
            try {
                $xml = simplexml_load_string($payload, 'SimpleXMLElement', (LIBXML_VERSION >= 20700) ? (LIBXML_PARSEHUGE | LIBXML_NOCDATA) : LIBXML_NOCDATA);
                $ns = ['' => null] + $xml->getDocNamespaces(true);
                return $this->recursive_parse($xml, $ns);
            } catch (\Exception $ex) {
                throw new ParserException('Failed To Parse XML');
            }
        }

        return [];
    }
1328634
public function respondUpdatedWithPayload($payload = null, $message = "Updated")
    {
        $reponse = $this->setStatusCode(ResponseHTTP::HTTP_ACCEPTED)
            ->respondWithMessageAndPayload($payload, $message);
        return $reponse;
    }
386159
private function performPostRequest($payload)
	{
	    $payload[] = ['type' => $this->apiXType, 'routing' => $this->apiXRoute, 'token' => $this->apiXToken];
		$this->response = $this->client->request('POST', [
            'query' => $payload
        ]);
	}
1074041
public function trigger(Payload $payload)
    {
        if (!$this->command) {
            return $this->targetState();
        }

        return call_user_func($this->command, $payload) ? $this->targetState() : $this->errorState();
    }
1271547
public function fill($payload)
    {
        $payload = $this->determineTypeAndMessage($payload);
        $payload = $this->fillBlanks($payload);
        return $payload;
    }
375616
private static function serializePayload($payload = '') : string
    {
        // If the payload is already JSON, return it
        if (\is_string($payload)) {
            return $payload;
        }

        $data = '';

        if (!empty($payload)) {
            $data = \json_encode($payload, JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE | JSON_PRESERVE_ZERO_FRACTION);
        }

        return $data;
    }
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;
    }
89042
public function deserializeToken($payload)
  {
    try {
      $payload = str_replace(array('-', '_'), array('+', '/'), $payload);
      $data = $this->encrypter->decrypt($payload);
    } catch (DecryptException $e) {
      return null;
    }

    if(empty($data['id']) || empty($data['key'])) {
      return null;
    }

    $token = $this->generateAuthToken($data['key']);
    $token->setAuthIdentifier($data['id']);

    return $token;
  }