Pluf Framework

Sign in or create your account | Project List | Help

Pluf Framework Commit Details

Date:2008-11-20 19:58:29 (1 year 9 months ago)
Author:Loic d'Anterroches
Commit:1aa66025b77aeb5a17860888652762b368e14fee
Message:Added the helloworld application.

Files: apps/helloworld/Hello/Views.php (1 diff)
apps/helloworld/Hello/conf/hello.php (1 diff)
apps/helloworld/Hello/conf/urls.php (1 diff)
apps/helloworld/index.php (1 diff)

Change Details

apps/helloworld/Hello/Views.php
1<?php
2class 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
3return array('hello_urls' => dirname(__FILE__).'/urls.php');
4
apps/helloworld/Hello/conf/urls.php
1<?php
2return 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
2set_include_path('../../src');
3require 'Pluf.php';
4Pluf::start(dirname(__FILE__).'/Hello/conf/hello.php');
5Pluf_Dispatcher::loadControllers(Pluf::f('hello_urls'));
6Pluf_Dispatcher::dispatch(Pluf_HTTP_URL::getAction());
7

Archive Download the corresponding diff file

Branches:
develop
master