2009年2月23日星期一

Re: [fw-mvc] Initializer.php

By Initializer.php, do you mean a front controller plugin that calls bootstrap functions? This is how I do mine:
the plugin class: http://code.google.com/p/mz-project/source/browse/trunk/library/Mz/Bootstrapper.php
bootstrap: http://code.google.com/p/mz-project/source/browse/trunk/demo/app/bootstrap.php
(I include this in my index.php and call run().)

It doesn't really demonstrate any benefit over the conventional way though. Maybe one benefit is that you can include the same bootstrap file in PHPUnit or Doctrine and call only the functions they need.

   -- Mon


On Mon, Feb 23, 2009 at 11:55 PM, Ed Lazor <edlazor@internetarchitects.biz> wrote:
Could someone post their copy of Initializer.php?  I'm looking for a
working example that shows how to use it and demonstrates the benefits
of doing so.  It doesn't have to be anything fancy.  I'm just trying
to switch from the old way of loading everything in the bootstrap and
an example or two would help a lot.
Thanks,
Ed

没有评论: