protected function createPayload(Job $job)
    {
        $payload = json_encode([
            'type'  => self::TYPE, //只有 type 为 tree6bee 才会自动处理，其他的不处理
            'job'   => serialize(clone $job),
        ]);

        if (JSON_ERROR_NONE !== json_last_error()) {
            throw new \InvalidArgumentException('Unable to create payload: ' . json_last_error_msg());
        }

        return $payload;
    }
protected function createPayload(Job $job)
    {
        $payload = json_encode([
            'type'  => self::TYPE, //只有 type 为 tree6bee 才会自动处理，其他的不处理
            'job'   => serialize(clone $job),
        ]);

        if (JSON_ERROR_NONE !== json_last_error()) {
            throw new \InvalidArgumentException('Unable to create payload: ' . json_last_error_msg());
        }

        return $payload;
    }
protected function createPayload ( Job $ job ) { $ payload = json_encode ( [ 'type' => self :: TYPE , //只有 type 为 tree6bee 才会自动处理，其他的不处理 'job' => serialize ( clone $ job ) , ] ) ; if ( JSON_ERROR_NONE !== json_last_error ( ) ) { throw new \ InvalidArgumentException ( 'Unable to create payload: ' . json_last_error_msg ( ) ) ; } return $ payload ; }
Create a payload string from the given job and data.

@param  Job $job
@return string

@throws \InvalidArgumentException
Create a payload string from the given job and data .