RegisterService('ModelReflection', $oModelReflection ?? new ModelReflectionRuntime()); $this->oCacheService = DataModelDependantCache::GetInstance(); } final public static function GetInstance(ModelReflection $oModelReflection = null): FormBlockService { if (!isset(static::$oInstance)) { static::$oInstance = new FormBlockService($oModelReflection); } return static::$oInstance; } public function GetFormBlockById(string $sId): FormBlock { if ($this->oCacheService->HasEntry(FormsCompiler::CACHE_POOL, $sId)) { $this->oCacheService->Fetch(FormsCompiler::CACHE_POOL, $sId); } return new $sId($sId); } }