private function check()
 {
     $ext = SymphonyExtensions::getExtensionAsXML($this->extensionHandle);
     // $xml->xpath('/response/extension/@id');
 }
Exemple #2
0
 private function searchExtension($query)
 {
     $xml = SymphonyExtensions::getExtensionAsXML($query);
     $xml = current($xml);
     $this->extensionHandle = $xml->xpath('/response/extension/@id');
     if (empty($this->extensionHandle)) {
         throw new Exception(__("Could not find extension handle"));
     } else {
         $this->extensionHandle = (string) $this->extensionHandle[0];
     }
     $this->downloadUrl = $xml->xpath("/response/extension/link[@rel='github:zip']/@href");
     if (empty($this->downloadUrl)) {
         throw new Exception(__("Could not find extension handle"));
     } else {
         $this->downloadUrl = (string) $this->downloadUrl[0];
     }
 }