Register a module path.

@param string $path
428733
public static function registerModulePath($path)
    {
        if (file_exists($path)) {
            self::$_modulePaths[] = $path;
        } else {
            user_error(__d('wasabi_cms', 'Module path {0} does not exist.', $path));
        }
    }
1330099
public function add_default_path(string $path)
    {
        $path = \trailingslashit($path);
        $this->paths[] = $path;
        $this->parse_files($path, false);
    }
334573
public function registerFile($path)
    {
        $hash = md5($path);

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

        return $this;
    }
47121
public static function load(string $path): void
    {
        $filePath = \absolute_path($path, static::FILE);
        if (!\is_readable($filePath) || !\is_file($filePath)) {
            return;
        }

        $array = self::optimizeGet($path, $filePath);

        if ($array === false) {
            $array = \parse_ini_file($filePath, false, INI_SCANNER_RAW);
        }

        foreach ($array as $name => $value) {
            static::set($name, $value);
        }

        self::optimizeSet($path, $array, $filePath);
    }
664847
public function setVendorPath($path)
    {
        $this->_vendorPath = Zilf::getAlias($path);
        Zilf::setAlias('@vendor', $this->_vendorPath);
        Zilf::setAlias('@bower', $this->_vendorPath . DIRECTORY_SEPARATOR . 'bower');
        Zilf::setAlias('@npm', $this->_vendorPath . DIRECTORY_SEPARATOR . 'npm');
    }
835603
public function amInPath($path)
    {
        chdir($this->path = $this->absolutizePath($path) . DIRECTORY_SEPARATOR);
        $this->debug('Moved to ' . getcwd());
    }
1287354
public function setPath($path)
    {
        if (!$this->databaseIsPath) {
            $path = ltrim($path, '/');
        }
        $this->setDatabase($path);
    }
944175
public function setRuntimePath($path)
    {
        $this->_runtimePath = $this->getAlias($path);
        $this->setAlias('@runtime', $this->_runtimePath);
    }
375953
private function setPath($path)
    {
        $parts = pathinfo($path);

        $this->info['path'] = [];

        if (isset($parts['dirname'])) {
            foreach (explode('/', str_replace(DIRECTORY_SEPARATOR, '/', $parts['dirname'])) as $dir) {
                if ($dir !== '') {
                    $this->info['path'][] = $dir;
                }
            }
        }

        $this->info['file'] = isset($parts['filename']) ? $parts['filename'] : null;
        $this->info['extension'] = isset($parts['extension']) ? $parts['extension'] : null;
    }
1137939
def register_prefix(self, path):
        
        if path not in self._prefixes:
            LOG.debug('%r: registering prefix %r', self, path)
            self._prefixes.add(path)
1129978
public function registerPath($path)
    {
        $this->paths[] = Normalizer::path((string) $path, true);

        return $this;
    }
1146926
def register(self, path):
        
        if path not in self._paths:
            LOG.debug('%r: registering %r', self, path)
            self._paths.add(path)
302766
private function addPlugins($path)
	{
		foreach (glob($path . '/*.php') as $filename)
		{
			$commandClass = __NAMESPACE__ . '\\' . basename($filename, '.php') . 'Command';
			$command = new $commandClass;
			$this->add($command);
		}
	}
277193
private function setPath($path)
    {
        $this->info['path'] = $this->info['file'] = $this->info['extension'] = $this->info['content'] = null;

        if ($this->getScheme() === 'data') {
            $this->info['content'] = $path;

            return;
        }

        $file = substr(strrchr($path, '/'), 1);

        if (strlen($file)) {
            $path = substr($path, 0, -strlen($file));

            if (preg_match('/(.*)\.([\w]+)$/', $file, $match)) {
                $this->info['file'] = rawurldecode($match[1]);
                $this->info['extension'] = $match[2];
            } else {
                $this->info['file'] = rawurldecode($file);
            }
        }

        $this->info['path'] = [];

        foreach (explode('/', $path) as $dir) {
            $dir = rawurldecode($dir);

            if ($dir !== '') {
                $this->info['path'][] = $dir;
            }
        }
    }
320446
public final function registerModule(Module $module)
    {
        $dependencies = $module->getModules();

        foreach($dependencies as $dependency){
            $this->registerModule($dependency);
        }

        $this->modules[$module->getModuleName()] = $module;
    }
982085
public static function registerPath($path)
    {
        $path = realpath($path);
        if (!in_array($path, self::$paths)) {
            self::$paths[] = $path;
            self::$cache   = null;
        }
    }
1284790
public function setPath($path = "")
    {
        if ($path != "") {
            $this->_path = str_replace("\\", DS, $path);
            $this->_path = (substr($this->_path, -1) == DS) ? substr($this->_path, 0, -1) : $this->_path;
        }
    }