getRequestExtra(); $this->item64 = $extra[0]; } public function run() { if($this->request['method'] != 'GET') { $this->setBodyError(500, "arkiwiRequestPostMetadata: POST method required."); return; } //INIZIO CAZZACCROCCHIO //lo rimuoveremo quando H si decide a scrivere la parte che legge metadati anche nell'uploader $items = array(); $metadata = file_get_contents($GLOBALS["conf"]["assetstore_endpoint"]."/item64/".$this->item64."/direct"); $metadata = simplexml_load_string($metadata)->xpath("/item/*"); for ($i = 0; $i < count($metadata); $i++) { $namespace = $metadata[$i]->getNamespaces(); if (!$namespace[arav]) { $items[] = array("name" => $metadata[$i]->getName(), "value" => $metadata[$i]->__toString()); } } json_encode($items); //FINE CAZZACCROCCHIO $this->setCode(201); $this->setBodyJSON($items); } }