コード例 #1
0
 function adddependencyofall($type = null, $dir = '')
 {
     if ($type === null) {
         adddependencyofall(COMPONENT_HELPER, 'helpers');
         adddependencyofall(COMPONENT_LIBRARY, 'libraries');
         adddependencyofall(COMPONENT_CONTROLLER, 'controllers');
         adddependencyofall(COMPONENT_HANDLER, 'libraries/handlers');
         adddependencyofall(COMPONENT_MODEL, 'models');
     } else {
         if ($type == COMPONENT_LIBRARY && strtoupper($dir) == 'LIBRARIES/HANDLERS') {
             // skip the second
         } else {
             $files = scandir($dir);
             foreach ($files as $file) {
                 if (!is_dir($dir . '/' . $file)) {
                     $modulename = preg_replace('/\\.[^.\\s]{3,4}$/', '', $file);
                     addmoduletodependency($modulename, $type, $dir);
                 }
             }
         }
     }
 }
コード例 #2
0
ファイル: easy.php プロジェクト: vajayattila/easyphpframe
 /**
  * @brief Init
  */
 function init()
 {
     if (!defined('easyframework_inited')) {
         define('easyframework_inited', true);
     }
     includeeasyhelper('constants');
     includeeasyhelper('dependency');
     includeeasyhelper('logger');
     log_message(LOGGER_SYSTEM, 'Loading dependency informations begin ---------------------------------------');
     adddependencyofall();
     log_message(LOGGER_SYSTEM, 'Loading dependency informations end -----------------------------------------');
     includeeasyhelper('dependency');
     includeeasyhelper('constants');
     includeeasyhelper('logger');
     includeeasyhelper('utils');
     includeeasyhelper('ini');
     adddependency(easy::$instance->getlibraryname(), $this->getversion(), COMPONENT_LIBRARY, 'logger', '1.0.0.2', COMPONENT_HELPER);
     adddependency(easy::$instance->getlibraryname(), $this->getversion(), COMPONENT_LIBRARY, 'easyinireaderwriter', '1.0.0.5', COMPONENT_LIBRARY);
     adddependency(easy::$instance->getlibraryname(), $this->getversion(), COMPONENT_LIBRARY, 'ini', '1.0.0.1', COMPONENT_HELPER);
     adddependency(easy::$instance->getlibraryname(), $this->getversion(), COMPONENT_LIBRARY, 'utils', '1.0.0.3', COMPONENT_HELPER);
     log_message(LOGGER_SYSTEM, $this->getlibraryname() . ' library is inited. version:' . $this->getversion());
 }