Skip to content

Instantly share code, notes, and snippets.

@colindecarlo
Created November 25, 2012 14:25
Show Gist options
  • Save colindecarlo/4143730 to your computer and use it in GitHub Desktop.
Save colindecarlo/4143730 to your computer and use it in GitHub Desktop.
<?php
require_once __DIR__ . '/../scripts/bootstrap.php';
$app->get('/upload', 'Pxweb\Controller\UploadController::indexAction');
$app->post('/upload', 'Pxweb\Controller\UploadController::uploadAction');
$app->post('/sendToGoogle', 'Pxweb\Controller\GearmanController::uploadAction');
$app->get('/show/{id}', 'Pxweb\Controller\PictureController::showAction');
$app->get('/images/{type}/{id}', 'Pxweb\Controller\PictureController::imageAction');
// main page
$app->get('/{year}/{month}/{dayOrRange}', 'Pxweb\Controller\PictureController::indexAction')
->value('year', null)->assert('year', '\d{4}')
->value('month', null)->assert('month', '\d{2}')
->value('dayOrRange', null)->assert('dayRange', '\d{2}(?:-\d{2})?');
$app->run();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment