Beispiel #1
0
 /**
  * Guess magento edition and version
  *
  * @param string $url
  *
  * @return array|boolean
  */
 public function getInfo($url)
 {
     $file = new File('src/config/version/hash.json');
     foreach ($file->getJson() as $path => $hash) {
         $response = $this->getRequest()->fetch($url . $path, array(CURLOPT_FOLLOWLOCATION => true));
         $md5 = md5($response->body);
         if (isset($hash[$md5])) {
             return $hash[$md5];
         }
     }
     return false;
 }
Beispiel #2
0
 /**
  * Get all paths to be tested
  *
  * @return string[]
  */
 public function getPaths()
 {
     $file = new File('unreachablepath.json');
     return $file->getJson();
 }
Beispiel #3
0
 /**
  * Get modules files as array
  *
  * @return array
  */
 public function getFiles()
 {
     $file = new File('src/config/module.json');
     return $file->getJson();
 }