public function __construct(Route $defaultRoute, $defaultLocale = 'en', array $locales, TranslatorInterface $translator, $translationDomain = 'routes') { $this->defaultLocale = $defaultLocale; $this->locales = $locales; $this->translator = $translator; $this->translationDomain = $translationDomain; parent::__construct($defaultRoute); }
public function __construct(APIController $controller) { parent::__construct(new Route()); $this->api = new VoteAPI(); $this->api_controller = $controller; $this->get("/", array($this, "defaultAction")); $this->get("/{venue_id}/", array($this, "getVenueScore")); $this->post("/{venue_id}/up", array($this, "voteVenueUp")); $this->post("/{venue_id}/down", array($this, "voteVenueDown")); // TODO: Does this need to be set explicitly? $this->before(array($controller, "authenticate")); }
public function __construct(APIController $controller) { parent::__construct(new Route()); $this->api = new VenueAPI(); $this->api_controller = $controller; $this->vote_api = new VoteAPI(); $this->get("/", array($this, "getVenues")); $this->post("/add", array($this, "addVenue")); $this->get("/search/{criteria}", array($this, "searchVenues"))->assert("criteria", ".+"); $this->get("/{venue_id}/", array($this, "getVenue")); $this->get("/{venue_id}/report", array($this, "getVenueReports")); $this->post("/{venue_id}/report", array($this, "reportVenue")); // TODO: Does this need to be set explicitly? $this->before(array($controller, "authenticate")); }
public function __construct(Route $defaultRoute, $defaultLocale = 'en', array $locales) { $this->defaultLocale = $defaultLocale; $this->locales = $locales; parent::__construct($defaultRoute); }