Posted By

frietkot on 10/21/08


Tagged

class php autoload classes foreach


Versions (?)

Who likes this?

1 person have marked this snippet as a favorite

ILoveBeer


Autoload Classes and Functions


 / Published in: PHP
 

  1. foreach($autoload as $type => $name) {
  2.  
  3. if($type=='libraries' && $name != NULL) {
  4. require_once(SYS_PATH . 'libraries' . DIRSEP . $name . '.php');
  5. eval("\${$name} = new {$name}({$Pronto});");
  6. $Pronto->set($name);
  7. }
  8.  
  9. if($type=='helpers' && $name != NULL) {
  10. require_once(SYS_PATH . 'helpers' . DIRSEP . $name . '.php');
  11. }
  12.  
  13. }

Report this snippet  

You need to login to post a comment.