Zend Framework Source Code Snippets

Simple File Loader

Bookmark and Share
1
2
3
4
56
7
8
9
1011
12
13
14
class App_Application_Resource_Fileloader extends Zend_Application_Resource_ResourceAbstract {
  /**
   * @return null
   */
 public function init() {
                $options = $this->getOptions ();
                foreach ($options as $filePath)
                        include $filePath;
return null;                
        }
        
}
1
2
resources.fileLoader[] = LIBRARY_PATH "/App/Regex_Functions.php"
resources.fileLoader[] = LIBRARY_PATH "/App/Api_Functions.php"

Comments

sad sad
7 months ago

cool=) thx

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

Snippet description

Extremely simple resource for loading necessary files. I use it to load a set of files with functions that i need.

Snippet details

Created:
alex alex
7 months ago
Edited:
alex alex
7 months ago
Revision Id:
134
Edit Message:
Initial Release
ZF Version
1.8.3
Tags:
resource file loader
Comments:
1
Views:
430
Points:
0 (0 votes)

History

r134

Initial Release

alex alex
7 months ago
diff
r133

Initial Release

alex alex
7 months ago