12345678910111213141516171819202122232425262728293031323334353637383940414243444546 |
- <?php
- /** @package HELLO WORLD */
- set_include_path(
- './libs/' . PATH_SEPARATOR .
- './vendor/phreeze/phreeze/libs/' . PATH_SEPARATOR .
- get_include_path()
- );
- /* require framework libs */
- require_once 'verysimple/Phreeze/Dispatcher.php';
- require_once 'verysimple/Phreeze/ConnectionSetting.php';
- require_once 'verysimple/Phreeze/SimpleRouter.php';
- require_once 'verysimple/Phreeze/Phreezer.php';
- require_once 'Controller/TestController.php';
- $cs = new ConnectionSetting();
- $cs->ConnectionString = "localhost:3306";
- $cs->DBName = "hello_world";
- $cs->Username = "benchmarkdbuser";
- $cs->Password = "benchmarkdbpass";
- $cs->Type = "MySQL";
- $phreezer = new Phreezer($cs);
- $route_map = array(
- 'GET:' => array('route' => 'Test.JSON'),
- 'GET:json' => array('route' => 'Test.JSON'),
- 'GET:db' => array('route' => 'Test.DB'),
- 'GET:query' => array('route' => 'Test.Query'),
- 'GET:fortunes' => array('route' => 'Test.Fortunes'),
- 'GET:updates' => array('route' => 'Test.Updates'),
- 'GET:plaintext' => array('route' => 'Test.PlainText')
- );
- $router = new SimpleRouter('/','Test.JSON',$route_map);
- Dispatcher::$FAST_LOOKUP = true;
- Dispatcher::Dispatch(
- $phreezer,
- null,
- '',
- null,
- $router
- );
|