コード例 #1
0
 /**
  * @internal
  * @todo whether we should import constants when set COMPILER_OPTION_LITERALS
  */
 private function compile_import($package)
 {
     $src = '';
     $paths = PLUGTool::collect_package($package, 'php', false, $this->confname);
     foreach ($paths as $path) {
         // handle conf file
         if (strpos($path, $this->confdir) === 0) {
             $this->load_conf($path);
             // Not importing constants as literals will be used in source
             // WARNING: this will screw up usage like "if( defined() ....
             if ($this->opt(COMPILER_OPTION_LITERALS)) {
                 continue;
             }
         }
         $src .= $this->compile_php($path, 'import');
     }
     return $src;
 }