tags:

views:

51

answers:

1

Magento is started by running Mage::run() in index.php. Mage::run has three parameters: $code, $type, and $options. The first two are well-documented but I can't find anything about the third: $options.

I did read somewhere that you can move your etc directory to another place, but what other options can I set? I hope I can set the theme package; that's what I have been looking for.

+1  A: 

I haven't personally used the third argument but after some investigation I've found out that they are used to set the Mage_Core_Model_Config options: I've made a var_dump with the options and it looks something like this:

//excerpt from var_dump() of Mage_Core_Model_Config_Options
    protected '_data' => 
        array
          'app_dir' => string '/var/www/magento/app' (length=36)
          'base_dir' => string '/var/www/magento' (length=32)
          'code_dir' => string '/var/www/magento/app/code' (length=41)
          'design_dir' => string '/var/www/magento/app/design' (length=43)
          'etc_dir' => string '/var/www/magento/app/etc' (length=40)
          'lib_dir' => string '/var/www/magento/lib' (length=36)
          'locale_dir' => string '/var/www/magento/app/locale' (length=43)
          'media_dir' => string '/var/www/magento/media' (length=38)
          'skin_dir' => string '/var/www/magento/skin' (length=37)
          'var_dir' => string '/var/www/magento/var' (length=36)
          'tmp_dir' => string '/var/www/magento/var/tmp' (length=40)
          'cache_dir' => string '/var/www/magento/var/cache' (length=42)
          'log_dir' => string '/var/www/magento/var/log' (length=40)
          'session_dir' => string '/var/www/magento/var/session' (length=44)
          'upload_dir' => string '/var/www/magento/media/upload' (length=45)
          'export_dir' => string '/var/www/magento/var/export' (length=43)
Anda B
Hm, the option I need to set isn't in there but this is really helpful! Thanks.
mattalexx
I would guess these values by default come from `app/etc/config.xml` under the `<default><system><filesystem>` nodes...
Jonathan Day