Puli\Manager\Module\ModuleManagerImpl::loadModuleFile PHP Method

loadModuleFile() private method

Loads the module file for the module at the given install path.
private loadModuleFile ( string $installPath ) : ModuleFile | null
$installPath string The absolute install path of the module
return Puli\Manager\Api\Module\ModuleFile | null The loaded module file or `null` if none could be found.
    private function loadModuleFile($installPath)
    {
        if (!file_exists($installPath)) {
            throw FileNotFoundException::forPath($installPath);
        }
        if (!is_dir($installPath)) {
            throw new NoDirectoryException(sprintf('The path %s is a file. Expected a directory.', $installPath));
        }
        try {
            return $this->jsonStorage->loadModuleFile($installPath . '/puli.json');
        } catch (FileNotFoundException $e) {
            // Modules without module files are ok
            return null;
        }
    }