Created
June 29, 2017 09:30
-
-
Save raekul/dc8cc29034bcdcc8fa4f0c3452c094d4 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
class blah extends blah { | |
public function getDetails($place_id) | |
{ | |
$googlePlaces = new PlacesApi($this->key); | |
try { | |
$this->response = $googlePlaces->placeDetails($place_id); | |
if ($googlePlaces->getStatus() !== "OK") { | |
throw new Exception('Places API returned an invalid response'); | |
} | |
} catch (Exception $e) { | |
Mage::logException($e); | |
} | |
// We get an Illuminate/Collection so we have access to those methods | |
return $this->response->get('result'); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment