* @author Olivier Haquette * @license GNU General Public License http://www.gnu.org/licenses/gpl.html * @link http://rudloff.pro * */ require_once __DIR__.'/vendor/autoload.php'; require_once __DIR__.'/vendor/rudloff/smarty-plugin-noscheme/modifier.noscheme.php'; use Alltube\VideoDownload; $app = new \Slim\App(); $container = $app->getContainer(); $container['view'] = function ($c) { $view = new \Slim\Views\Smarty(__DIR__.'/templates/'); $view->addSlimPlugins($c['router'], $c['request']->getUri()); $view->registerPlugin('modifier', 'noscheme', 'Smarty_Modifier_noscheme'); return $view; }; $app->get( '/', array('Alltube\Controller\FrontController', 'index') ); $app->get( '/extractors', array('Alltube\Controller\FrontController', 'extractors') )->setName('extractors'); $app->get( '/video', array('Alltube\Controller\FrontController', 'video') )->setName('video'); $app->get( '/redirect', array('Alltube\Controller\FrontController', 'redirect') ); $app->get( '/json', array('Alltube\Controller\FrontController', 'json') ); $app->run();