Exemplo n.º 1
0
 function require_once_recursive($rootDir)
 {
     $hDir = opendir($rootDir);
     if ($hDir === false) {
         throw new InvalidArgumentException('rootDir');
     }
     while (($file = readdir($hDir)) !== false) {
         if (in_array($file, array('.', '..'))) {
             continue;
         }
         $filePath = "{$rootDir}/{$file}";
         $endsWith = strrpos($file, '.php') === strlen($file) - strlen('.php');
         if ($endsWith) {
             require_once $filePath;
         } else {
             if (is_dir($filePath)) {
                 require_once_recursive($filePath);
             }
         }
     }
     if ($hDir) {
         closedir($hDir);
     }
 }
Exemplo n.º 2
0
        if (strpos($name, "IBreadCrumbTransformer.php") || strpos($name, "ITripleGenerator.php") || strpos($name, "IValueParser.php") || strpos($name, "IFilter.php")) {
            continue;
        }
        if (strpos($name, ".php")) {
            //echo "require_once($name)\n";
            require_once $name;
        }
        //else
        //echo "Rejected: $name\n";
    }
}
require_once PATH . "IBreadCrumbTransformer.php";
require_once PATH . "TripleGenerator/ITripleGenerator.php";
require_once PATH . "ValueParser/IValueParser.php";
require_once PATH . "Filter/IFilter.php";
require_once_recursive(PATH);
// This extractor requires the template-database
//require_once(PATH."templateDb/helpers.php");
//require_once(PATH."templateDb/TemplateDb.php");
require_once "extractors/infobox/extractFunctions.php";
/**
 * Puts a value into a Map<TKey, List<TValue>>
 *
 *
 * So you can do:
 * $x = array();
 * putMultiMap($x, 1, 1);
 * putMultiMap($x, 1, 2);
 *
 * Not type safe
 *