This file contains hidden or 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
Where's the modules dir? [/var/www/ppi-skeleton/modules]: | |
Created module: FoursquareModule | |
To activate it, add 'FoursquareModule' to your 'activeModules' setting in ./app/modules.config.php |
This file contains hidden or 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
var map = null, | |
latitude = null, | |
longitude = null, | |
infoWindow = null; | |
function useDefaultLocation() { | |
latitude = 31.8391; | |
longitude = -106.5631; | |
} | |
This file contains hidden or 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 | |
namespace FoursquareModule\Controller; | |
use FoursquareModule\Controller\Shared as SharedController; | |
class Index extends SharedController | |
{ | |
public function indexAction() | |
{ | |
return $this->render('FoursquareModule:index:index.html.php'); |
This file contains hidden or 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
/** | |
* @param string $name The Service Name | |
* @param bool $usePeeringServiceManagers | |
* @return array|object | |
* @throws \Exception | |
*/ | |
public function get($name, $usePeeringServiceManagers = true) | |
{ | |
try { | |
return parent::get($name, $usePeeringServiceManagers); |
This file contains hidden or 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 | |
/** | |
* @param string $name The Service Name | |
* @param bool $usePeeringServiceManagers | |
* @return array|object | |
* @throws \Exception | |
*/ | |
public function get($name, $usePeeringServiceManagers = true) | |
{ |
This file contains hidden or 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 | |
public function get($name) | |
{ | |
try { | |
$result = parent::get($name); | |
return $result; | |
} catch(\Exception $e) { | |
do { | |
var_dump($e->getMessage()); |
This file contains hidden or 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
cd /var/www/ppi-skeleton | |
./app/console module:create FoursquareModule |
This file contains hidden or 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
#map {border:1px solid #565656;width:100%;height:500px;} | |
#map img { max-width: none !important; } |
This file contains hidden or 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 | |
public function getServiceConfig() | |
{ | |
return array('factories' => array( | |
// Create a service named foursquare.handler and map it to this lazy-loaded closure | |
// this is called from the controller. The code in this function is not called until a | |
// getService() call from a controller happens or if another service invokes it. | |
'foursquare.handler' => function($sm) { |
This file contains hidden or 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
Foursquare_Venues: | |
pattern: /foursquare/getVenues/lat/{lat}/lng/{lng} | |
defaults: { _controller: "FoursquareModule:Index:getVenues" } |