function current() { $current = $this->_iterator->current(); return $this->_pipe->process($current); }
/** * @return Item|mixed */ function current() { $current = $this->_result->current(); if (is_array($current)) { $current = (new Item($this->_collection))->setData($current); } return $this->_pipe->process($current); }
/** * @param Payload $payload * * @return Payload */ public function process($payload) { $this->builder->add(new IncludedResource())->add(new RequestedFields())->add(new PagedPagination())->add(new OffsetLimitPagination())->add(new CursorBasedPagination())->add(new Sorts()); $this->pipeline = $this->builder->build(); return $this->pipeline->process($payload); }
/** * Execute the job. * * @return void */ public function handle() { $this->pipeline->process($this->data); }