Guest User

Untitled

a guest
Dec 16th, 2018
93
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.59 KB | None | 0 0
  1. function activerecord_autoload($class_name)
  2. {
  3. $path = ActiveRecord\Config::instance()->get_model_directory();
  4.  
  5. if(is_array($path))
  6. {
  7. foreach($path as $k => $dir)
  8. {
  9. if( activerecord_load( $dir, $class_name ) )
  10. return;
  11. }
  12. }else{
  13. activerecord_load( $path, $class_name );
  14. }
  15. }
  16.  
  17. function activerecord_autoload($class_name)
  18. {
  19. $path = ActiveRecord\Config::instance()->get_model_directory();
  20.  
  21. if (is_array($path))
  22. {
  23. foreach ($path as $k => $dir)
  24. {
  25. if (activerecord_load($dir, $class_name))
  26. return;
  27. }
  28. }
  29. else
  30. activerecord_load($path, $class_name);
  31. }
Add Comment
Please, Sign In to add comment