/** * Gets the date of the last update of a domain or uri * * @return integer (unless a format string is supplied) */ public function executeLastupdate() { $domain = $this->getRequestParameter('domain'); $objects = $this->getRequestParameter('objects'); $type = $this->getRequestParameter('type', "json"); $lastUpdate = ""; if (isset($domain)) { if ('schemas' == $objects) { $lastUpdate = SchemaPropertyElementHistoryPeer::getLastUpdateForDomain($domain, null); } if ('vocabs' == $objects) { $lastUpdate = ConceptPropertyHistoryPeer::getLastUpdateForDomain($domain, null); } } switch ($type) { case "json": echo json_encode($lastUpdate); break; default: } return sfView::NONE; }