public function precrpajVseAction() { //deklaracija crpalka servisa(cs) in pridobitev parametrov $cs = $this->serviceLocator->get('crpalka.service.factory'); $entiteta = $this->params('entity'); $f = new \App\Filter\DecorateEntity(); $f->setServiceLocator($this->serviceLocator); $cs->precrpajVseBazo($f->filter($entiteta)); }
public function precrpajAction() { //deklaracija crpalka servisa(cs) in pridobitev parametrov $cs = $this->serviceLocator->get("crpalka.service.factory"); $globina = $this->params('globina'); $id = $this->params('id'); $entiteta = $this->params('entity'); $f = new DecorateEntity(); $f->{$this}->setServiceLocator($this->getServiceLocator()); $entityClass = $f->filter($entiteta); // če id ni guid, potem poiščem entiteto po identu if (!preg_match('/^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$/', $id)) { $id = $this->getByIdent($entityClass, $id); } $cs->precrpajBazo($entityClass, $id, $globina); }