Zend Framework Source Code Snippets

Bootstrap Init Constants from app.ini

Bookmark and Share
1
2
3
4
56
7
8
protected function _initConstants()
        {
                $options = $this->getOptions();
                if (isset($options['constant'])) {
                        foreach($options['constant'] as $constName=>$constValue)                                defined(strtoupper($constName)) || define(strtoupper($constName), $constValue); 
                }
        }

Comments

You must login before commenting on a snippet. If you do not have an account, please register.

Snippet description

Load constants defined in config file

>>>
constant.const_name = const_value

Snippet details

Created:
Geoffroy Geoffroy
1 year ago
Edited:
Geoffroy Geoffroy
1 year ago
Revision Id:
173
Edit Message:
Initial Release
ZF Version
1.10.7
Tags:
bootstrap constants
Comments:
0
Views:
4907
Points:
0 (0 votes)

History

r173

Initial Release

Geoffroy Geoffroy
1 year ago
diff
r172

Initial Release

Geoffroy Geoffroy
1 year ago
diff
r171

Initial Release

Geoffroy Geoffroy
1 year ago