Change Details
| apps/helloworld/Hello/Views.php |
| 1 | <?php |
| 2 | class Hello_Views |
| 3 | { |
| 4 | public function hello($request, $match) |
| 5 | { |
| 6 | return new Pluf_HTTP_Response('Hello World!'); |
| 7 | } |
| 8 | } |
| apps/helloworld/Hello/conf/hello.php |
| 1 | <?php |
| 2 | |
| 3 | return array('hello_urls' => dirname(__FILE__).'/urls.php'); |
| 4 | |
| apps/helloworld/Hello/conf/urls.php |
| 1 | <?php |
| 2 | return array( |
| 3 | array( |
| 4 | 'regex' => '#^/hello/$#', |
| 5 | 'base' => '', |
| 6 | 'priority' => 4, |
| 7 | 'model' => 'Hello_Views', |
| 8 | 'method' => 'hello' |
| 9 | ) |
| 10 | ); |
| 11 | |
| apps/helloworld/index.php |
| 1 | <?php |
| 2 | set_include_path('../../src'); |
| 3 | require 'Pluf.php'; |
| 4 | Pluf::start(dirname(__FILE__).'/Hello/conf/hello.php'); |
| 5 | Pluf_Dispatcher::loadControllers(Pluf::f('hello_urls')); |
| 6 | Pluf_Dispatcher::dispatch(Pluf_HTTP_URL::getAction()); |
| 7 | |
Download the corresponding diff file