1 Aug 2004 14:16
Re: Init change and complains
Am 31.07.2004 um 18:12 schrieb Jason Hines:
> What did we agree on for retreiving the Init instance?
>
> 1. Override getInstance()
> 2. Make Init completely static
> 3. Other?
I'd like to propose that Init could be renamed to Project to reflect
that it is inherited for each project when you need non default
behaviour (you should be able to work with good defaults of stock
Project, though). The base class Project should have a configureable
"getInstance()" method.
In conf/Common.conf.xml:
<section name="common">
<param name="project_class">path/to/custom/Project.php</param>
</section>
in binarycloud/init/Project.php:
function &getInstance() {
static $instance = null;
if ($instance == null) {
$conf =& Conf::getInstance('conf/Common.php');
$settings = $conf->getConf('common');
(Continue reading)
RSS Feed