<?php
namespace Claromentis\Console\Util;

$GLOBALS["__65da1b1ec2d6653e8a0ab7848e53" . "6215"] = (@$GLOBALS["__65da1b1ec2d66" . "53e8a0ab7848e53" . "6215"] ?: array()) + array();
use Claromentis\Core\DAL\Interfaces\DbInterface;
use Claromentis\Core\Module;
use Claromentis\Core\Services;
use Claromentis\Setup\VersionFile;








class ApplicationRegistry
{
    protected DbInterface $database;
    protected Locator $locator;
    protected Module\Api $moduleApi;
    
    
    
    
    
    
    
    public function __construct(Locator $_958a49c0e9814c5c29eb8698e3fb6de2, Module\Api $_77a4fbed1bdc657174d2f875c65b3566 = null)
    {
        $this->locator = $_958a49c0e9814c5c29eb8698e3fb6de2;
        $this->moduleApi = $_77a4fbed1bdc657174d2f875c65b3566 ?? Services::I()->{Module\Api::class};
    }
    
    
    
    
    
    
    
    public function setDatabase(DbInterface $_4504853ce5094b088c8bdc3d570a0a5d) : void
    {
        $this->database = $_4504853ce5094b088c8bdc3d570a0a5d;
        $this->moduleApi->setDatabase($_4504853ce5094b088c8bdc3d570a0a5d);
    }
    
    
    
    
    
    
    
    
    
    public function isInstalled($_f44467aacb8a4520c7382769d24aa422) : bool
    {
        return $this->moduleApi->isInstalled($_f44467aacb8a4520c7382769d24aa422);
    }
    
    
    
    
    
    
    
    
    
    
    public function checkVersion($_f44467aacb8a4520c7382769d24aa422) : int
    {
        return $this->moduleApi->checkSchemaVersion($_f44467aacb8a4520c7382769d24aa422);
    }
    
    
    
    
    
    
    
    public function getSchemaVersion($_f44467aacb8a4520c7382769d24aa422) : ?string
    {
        return $this->moduleApi->getInstalledSchemaVersion($_f44467aacb8a4520c7382769d24aa422);
    }
    
    
    
    
    
    
    
    public function getFilesVersion($_f44467aacb8a4520c7382769d24aa422) : ?string
    {
        return $this->moduleApi->getSchemaVersion($_f44467aacb8a4520c7382769d24aa422);
    }
    
    
    
    
    
    
    
    public function getVersionName($_f44467aacb8a4520c7382769d24aa422) : string
    {
        return $this->moduleApi->getVersion($_f44467aacb8a4520c7382769d24aa422);
    }
    
    
    
    
    
    
    
    public function getApplicationName($_f44467aacb8a4520c7382769d24aa422) : string
    {
        return $this->moduleApi->getName($_f44467aacb8a4520c7382769d24aa422);
    }
    
    
    
    
    
    
    
    
    public function getVersionFile($_f44467aacb8a4520c7382769d24aa422) : VersionFile
    {
        return $this->moduleApi->getVersionFileOrFail($_f44467aacb8a4520c7382769d24aa422);
    }
    
    
    
    
    
    
    
    
    
    
    public function getAllCodes() : array
    {
        return $this->moduleApi->getSchemaApplicationCodes();
    }
    
    
    
    
    
    
    public function getDirectoryCodes() : array
    {
        return $this->moduleApi->getFilesystemApplicationCodes();
    }
    
    
    
    
    
    
    public function getInstalledCodes()
    {
        return $this->moduleApi->getInstalledApplicationCodes();
    }
    
    
    
    
    
    
    
    public function appIsCore($_f44467aacb8a4520c7382769d24aa422) : bool
    {
        return $this->moduleApi->isCore($_f44467aacb8a4520c7382769d24aa422);
    }
    
    
    
    
    
    
    
    
    
    
    
    public function normalizeAppCode($_f44467aacb8a4520c7382769d24aa422) : string
    {
        return $this->moduleApi->normalizeApplicationCode($_f44467aacb8a4520c7382769d24aa422);
    }
    
    
    
    
    
    
    
    
    
    public function sanitizeAppCode($_f44467aacb8a4520c7382769d24aa422) : string
    {
        return $this->normalizeAppCode($_f44467aacb8a4520c7382769d24aa422);
    }
}