/** * @param CreateAnnotationCriteria $criteria * @return bool */ public function create(CreateAnnotationCriteria $criteria) { try { $this->adapter->call('Annotations.create', $criteria); return true; } catch (ServerException $e) { return false; } }
/** * @param UpdateStepCriteria $criteria * @return bool */ public function updateStep(UpdateStepCriteria $criteria) { try { $this->adapter->call('Document.updateStep', $criteria); return true; } catch (ServerException $e) { return false; } }
/** * @inheritdoc */ public function next() { $this->iterator->next(); if ($this->autoloadEnabled && !$this->iterator->valid() && $this->paginator->hasMorePage()) { $this->paginator->incrPageNumber(); /** @var Collection $newCollection */ $newCollection = $this->adapter->map($this->subject, $this->context)->call($this->method, $this->criteria, $this->paginator); $this->iterator = new \ArrayIterator($newCollection->asArray(false)); $this->iterator->rewind(); } }
/** * @param SearchItemsCriteria $criteria * @param Paginator|null $paginator * @return Collection */ public function searchItems(SearchItemsCriteria $criteria, Paginator $paginator = null) { return $this->adapter->map(ItemInterface::class, 'list')->call('Catalogue.getList', $criteria, $paginator); }
/** * @param Paginator|null $paginator * @return Collection */ public function listAll(Paginator $paginator = null) { return $this->adapter->map(PeopleInterface::class, 'list')->call('Staffs.getList', new EmptyCriteria(), $paginator); }
/** * @return ApiInfosInterface */ public function getApiInfos() { return $this->adapter->map(ApiInfosInterface::class, 'default')->call('Infos.getInfos'); }
/** * @param SearchCustomersCriteria $criteria * @param Paginator|null $paginator * @return Collection */ public function searchCustomers(SearchCustomersCriteria $criteria, Paginator $paginator = null) { return $this->adapter->map(CustomerInterface::class, 'list')->call('Client.getList', $criteria, $paginator); }