Example #1
0
 /**
  * Get all include paths. APPPATH is the first path, followed by module
  * paths in the order they are configured, follow by the self::config('core.path.system').
  *
  * @param   boolean  re-process the include paths
  * @return  array
  */
 public static function include_paths($process = FALSE)
 {
     if ($process === TRUE) {
         // Add APPPATH as the first path
         self::$include_paths = array(self::config('core.path.css'), self::config('core.path.system') . 'modules/');
         # Find the modules and plugins installed
         $modules = self::list_files('modules', FALSE, self::config('core.path.system') . '/modules');
         foreach ($modules as $path) {
             $path = str_replace('\\', '/', realpath($path));
             if (is_dir($path)) {
                 // Add a valid path
                 self::$include_paths[] = $path . '/';
             }
         }
         # Add self::config('core.path.system') as the last path
         self::$include_paths[] = self::config('core.path.system');
     }
     return self::$include_paths;
 }