views:

67

answers:

1

Hi,

I am learning Zend Framework recently. I followed zend framework quickstart and...it was great. One thing I did not like was using .ini file to set bootstrap path, class, and other things.

Is it possible to set configurations using code only? I googled it, but no luck.

+3  A: 

I found out myself.

$config = array(
    "bootstrap"=>array(
     "path"=>"Bootstrap.php"
     ,"class"=>"Bootstrap"
    )
);

$config = new Zend_Config($config);

// Create application, bootstrap, and run
$application = new Zend_Application(
    'production'
    ,$config
);
Moon
Actually, you can use any Zend_Config adapter (INI, XML, PHP array, ...)
Tomáš Fejfar