Example #1
1
 function current()
 {
     $current = $this->_iterator->current();
     return $this->_pipe->process($current);
 }
Example #2
0
 /**
  * @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);
 }
Example #3
0
 /**
  * @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);
 }
Example #4
0
 /**
  * Execute the job.
  *
  * @return void
  */
 public function handle()
 {
     $this->pipeline->process($this->data);
 }