/** * @return Psc\CMS\RequestMeta */ public function getDeleteRequestMeta(Entity $entity = NULL) { if (!isset($this->deleteRequestMeta)) { $idIsInt = ($type = $this->getIdentifier()->getType()) instanceof IntegerType; $this->deleteRequestMeta = new RequestMeta(\Psc\Net\HTTP\Request::DELETE, $this->constructUrl(array($this->getEntityName(), $idIsInt ? '%d' : '%s')), array($type)); } if (isset($entity)) { $meta = clone $this->deleteRequestMeta; return $meta->setInput($entity->getIdentifier()); } return $this->deleteRequestMeta; }
/** * @return mixed */ public function getIdentifier() { return $this->entity->getIdentifier(); }