Shaikh Sonny Aman’s Blog

previously www.mailtoaman.com

index.php : Stepping into php Orchid framework

Posted on | March 13, 2008 |

Recently I had the opportunity to involve in php orchid framework developed by Hasin Hayder. This is a MVC framework with lots of feature a system would ever need. Many of these features are already implemented while some are still under development. And surely there will be some other feature which will be recommended by YOU.

I am going to write a series of articles stating my journey into Orchid. This will help me to store the knowledge that I learned and help as a documentation.

index.php:

All request is first come to index.php. It has only four line:

include(”core/ini.php”);
initializer::initialize();
$router = loader::load(”router”);
dispatcher::dispatch($router);

The ini file defines the __autoload function which dyanmically includes the necessary definition files for the required object. The search path includes

“/core/main”,
“/core/libraries”,
“/core/main/dbdrivers”,
“/core/main/cache”,
“/core/helpers”,
“/app/models”,
“/app/views”

initializer::initialize();

initializer is a class resides in “/core/main” directory having a static function initialze(). Any extra initializing will take place here. At present, Wednesday, March 12 2008, the function is blank.

$router = loader::load(”router”);

Here the $router object is loaded by the loader. Router is responsible to extract the controller and action information from the url.

dispatcher::dispatch($router);

Dispatcher, as the name implies,  finds the controller and calls the action. If there is no redirection request, it loads the view and shows the output.

Thats it so far.

Cheers.

Comments

6 Responses to “index.php : Stepping into php Orchid framework”

  1. The 411 on Core Loaders » Blog Archive » Quick Roundup
    March 16th, 2008 @ 12:14 pm

    [...] http://www.mailtoaman.com/2008/03/13/indexphp-stepping-into-php-orchid-framework/initializer is a class resides in “/core/main” directory having a static function initialze(). Any extra initializing will take place here. At present, Wednesday, March 12 2008, the function is blank. $router = loader::load(”router”); … [...]

  2. The 411 on Core Loaders » Blog Archive » Fast Monday links
    March 17th, 2008 @ 12:27 pm

    [...] http://www.mailtoaman.com/2008/03/13/indexphp-stepping-into-php-orchid-framework/initializer is a class resides in “/core/main” directory having a static function initialze(). Any extra initializing will take place here. At present, Wednesday, March 12 2008, the function is blank. $router = loader::load(”router”); … [...]

  3. The 411 on Core Loaders » Blog Archive » What others have been saying about core loader
    March 19th, 2008 @ 12:20 pm

    [...] http://www.mailtoaman.com/2008/03/13/indexphp-stepping-into-php-orchid-framework/initializer is a class resides in “/core/main” directory having a static function initialze(). Any extra initializing will take place here. At present, Wednesday, March 12 2008, the function is blank. $router = loader::load(”router”); … [...]

  4. The 411 on Core Loaders » Blog Archive » Quick Roundup
    March 20th, 2008 @ 12:35 pm

    [...] http://www.mailtoaman.com/2008/03/13/indexphp-stepping-into-php-orchid-framework/initializer is a class resides in “/core/main” directory having a static function initialze(). Any extra initializing will take place here. At present, Wednesday, March ANZ Credit Cards 12 2008, the function is blank. $router = loader::load(”router”); … [...]

  5. hvorre
    April 6th, 2008 @ 10:44 am

    I agree with everybody else: awesome story.! Much food for thought… It really made my day. Thank you.

  6. ben2k7
    April 9th, 2008 @ 2:36 am

    There are many ways to express yourself in real word. I don’t see the reason why all those websites are still popular

Leave a Reply