Register a configuration file to be bootstrapped

@param string $path  The absolute path to the file
@return ObjectBootstrapper
334573
public function registerFile($path)
    {
        $hash = md5($path);

        if(!isset($this->_files[$hash])) {
            $this->_files[$hash] = $path;
        }

        return $this;
    }
562261
function requireTree($path)
    {
        $resolved = $this->resolve($path);

        if (!$resolved) {
            throw new \InvalidArgumentException("Path '$path' not found.");
        }

        $dir = new \FilesystemIterator($resolved);

        foreach ($dir as $file) {
            # Ignore dotted files
            if (substr($file->getBasename(), 0, 1) !== '.') {
                $this->requireAsset($file->getRealpath());
            }
        }

        return $this;
    }
578599
private function loadFromFile($path)
    {
        if ( ! is_file($path)) {
            return;
        }
        
        $config = require_once $path;
        
        if (is_array($config)) {
            $this->config = $config;
        }
    }
1309462
public function setBasePath($path) {
		$path = rtrim($path, DIRECTORY_SEPARATOR);
		
		if (! file_exists($path) || ! is_dir($path)) {
			throw new ConfigError('Base directory does not exists: "' . $path . '"');
		}
		
		$this->_basePath = $path;
		
		return $this;
	}
1195986
public function createAutoload($path)
	{
		$loader = new Loaders\RobotLoader;
		$loader->setCacheStorage(new Caching\Storages\FileStorage($this->temp));
		$loader->addDirectory($path)->register();
		return $loader;
	}
729366
public function withPath(string $path): self
    {
        $newConstraints = $this->constraints;
        $newConstraints[self::CONSTRAINT_PATH] = $path;
        return new static($newConstraints);
    }
1023803
private function addPath($path)
    {
        $path = $this->resolvePath($path);

        if ($this->validatePath($path)) {
            $this->paths[] = $path;
        }

        return $this;
    }
638459
public function bootstrap()
    {
        $providers = Zilf::$container->getShare('config')->get('services');

        foreach ($providers as $provider) {
            $instance = $this->createProvider($provider);
            $instance->register();
        }
    }
588043
public function loadFile($path) {
        $config = null;

        try {
            $config = require $path;
        } catch (Exception $ex) {}

        if ( ! is_array($config)) {
            throw new InvalidConfigFormatException(
                s('ArrayConfigDriver expects config at path %s to be of format array[key => value].', $path)
            );
        }

        return $config;
    }
356959
public static function register($path)
	{
		self::$_path = $path;
		self::addPath($path);

		if ($loaders = spl_autoload_functions())
			array_map('spl_autoload_unregister', $loaders);
		else
			$loaders = function_exists('__autoload') ? array('__autoload') : array();

		array_unshift($loaders, array(__CLASS__, 'load'));
		array_map('spl_autoload_register', $loaders);
	}
659748
protected function registerCoreBootstrappers()
    {
        foreach ($this->getBootStrappers() as $key => $class) {
            $this->container->set($key, $this->compose('\\'.$class));
        }

        $this->bootstrappers->execute();

        return $this;
    }
994060
protected function registerBootChecker()
    {
        $this->app->singleton(Component::BOOTCHECKER, $this->getCoreConfig('bindings.' . Component::BOOTCHECKER));

        $this->app->bind(BootCheckerInterface::class, Component::BOOTCHECKER);

        return $this;
    }
629584
public function registerImportPath($path)
    {
        $current = $this->getPath();
        if (!isset($this->importPaths[$current])) {
            $this->importPaths[$current] = [];
        }

        $this->importPaths[$current][] = $path;

        if ($this->parentCompiler) {
            $this->parentCompiler->registerImportPath($path);
        }

        return $this;
    }
1065345
public function setPath($path) {
        if ($this->configured) throw new IllegalStateException('Configuration is frozen');
        if ($path[0] != '/')   throw new StrutsConfigException('<mapping'.($this->name ? ' name="'.$this->name.'"':'').' path="'.$path.'": Illegal path (value must start with a slash "/").');

        $this->path = $path;
        return $this;
    }
589370
public function loadBootstrap()
    {
        if (null !== ($file = $this->getBootstrapFile())) {
            if (false === file_exists($file)) {
                throw new InvalidArgumentException(
                    sprintf(
                        'The bootstrap path "%s" is not a file or does not exist.',
                        $file
                    )
                );
            }

            /** @noinspection PhpIncludeInspection */
            include $file;
        }
    }
1018621
protected function load($path)
    {
        /** @noinspection PhpIncludeInspection */
        $file = require($path);

        if (!is_array($file))
        {
            $message = "{$path} configuration file is not readable.";
            throw new ConfigException($message);
        }

        return $file;
    }
661472
public static function Init($path = '')
	{
		if( !is_null(self::$_Instance) )
		{
			// TODO error
		}

		self::$_Instance = new static($path);

		return self::$_Instance;
	}