Guest User

Untitled

a guest
Jun 22nd, 2018
109
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.93 KB | None | 0 0
  1. ## Pipeline_Installer
  2. public function actions(&$configuration)
  3. {
  4. foreach ($configuration as $name => $config)
  5. {
  6. if($moduleObject = $config['instance'])
  7. {
  8. //var_dump(get_class($config['instance']) .'->' .$config['action'] .'()');
  9. try{
  10. call_user_func(array($config['instance'], $config['action']), $config);
  11. } catch (Exception $e) {
  12. self::_setError(self::$errors, $e->getMessage());
  13.  
  14. $configuration[$name]['action'] = false;
  15. $configuration[$name]['instance'] = false;
  16. }
  17. }
  18. }
  19. //Doctrine::createTablesFromModels();
  20. var_dump( Doctrine::getLoadedModels());
  21. }
  22.  
  23. ## Pipeline_Configre
  24. public function install($config)
  25. {
  26. $possibleModels = glob($config['directory'] .'models/*.php', GLOB_MARK);
  27.  
  28. if (!empty($possibleModels))
  29. {
  30. Doctrine::loadModels($config['directory'] .'models/', Doctrine::MODEL_LOADING_AGGRESSIVE);
  31. }
  32. }
Add Comment
Please, Sign In to add comment