| @@ 60-65 (lines=6) @@ | ||
| 57 | public function getMagentoYear(Response $response) |
|
| 58 | { |
|
| 59 | ||
| 60 | if ($response->getStatusCode() == 200) { |
|
| 61 | preg_match('/([0-9]{4}).*Magento/', $response->getBody(), $match); |
|
| 62 | if (isset($match[1])) { |
|
| 63 | return $match[1]; |
|
| 64 | } |
|
| 65 | } |
|
| 66 | return false; |
|
| 67 | } |
|
| 68 | ||
| @@ 78-82 (lines=5) @@ | ||
| 75 | */ |
|
| 76 | public function getMagentoVersion(Response $response) |
|
| 77 | { |
|
| 78 | if ($response->getStatusCode() == 200) { |
|
| 79 | if (preg_match('/([0-9]{1,2}\.[0-9]{1,2}\.[0-9]{1,2}(\.[0-9]{1,2})?)/', $response->getBody(), $match)) { |
|
| 80 | return $match[1]; |
|
| 81 | } |
|
| 82 | } |
|
| 83 | return false; |
|
| 84 | } |
|
| 85 | ||