Disque\Command\Response\JobsResponse::parse PHP Method

parse() public method

public parse ( )
    public function parse()
    {
        $jobs = [];
        foreach ($this->body as $job) {
            // To describe this crucial moment in detail: $jobDetails as well as
            // the $job are numeric arrays with the same number of values.
            // array_combine() combines them in a new array so that values
            // from $jobDetails become the keys and values from $job the values.
            // It's very important that $jobDetails are present in the same
            // order as the response from Disque.
            $jobs[] = array_combine($this->jobDetails, $job);
        }
        return $jobs;
    }