/** * Add a classname-to-file map * * @param string $mapfile The filename of the classmap * * @return void */ protected static function addMap($mapfile) { if (!in_array($mapfile, self::$maps)) { // keep track of specific map file loaded in this // instance so we can update it if necessary self::$mapfile = $mapfile; if (file_exists($mapfile)) { $map = (include $mapfile); if (is_array($map)) { // mapfile contains a valid map, so we'll keep it self::$maps[] = $mapfile; self::$map = array_merge(self::$map, $map); } } } }