/** * Retrieve the lists of filenames. * Generate the Classes that list the Dal Modules names available in the * solution. * * @param assoc array $data depending on the situation, some data can be passed * on to generate the files desired. */ public function Run($data = null) { $FrameworkDalModules = DirectoryManager::GetFileNames("APP_ROOT_DIR" . \Puzzlout\Framework\Enums\FrameworkFolderName::DalModulesFolderName); $ApplicationDalModules = DirectoryManager::GetFileNames("APP_ROOT_DIR" . \Puzzlout\Framework\Enums\ApplicationFolderName::AppsFolderName . "APP_NAME" . \Puzzlout\Framework\Enums\ApplicationFolderName::DalModulesFolderName); $this->InitGenerateFrameworkFile($FrameworkDalModules); $this->InitGenerateApplicationFile($ApplicationDalModules); }
/** * Generate the files for an app. * * @param string $Appname */ function ProcessApplicationData($Appname) { $ApplicationControllers = DirectoryManager::GetFileNames("APP_ROOT_DIR" . \Puzzlout\Framework\Enums\ApplicationFolderName::AppsFolderName . $Appname . \Puzzlout\Framework\Enums\ApplicationFolderName::ControllersFolderName); $this->params = array(BaseClassGenerator::NameSpaceKey => "Applications\\" . $Appname . "\\Generated", BaseClassGenerator::ClassNameKey => $Appname . $this->GeneratedClassPrefix, BaseClassGenerator::DestinationDirKey => \Puzzlout\Framework\Enums\ApplicationFolderName::AppsFolderName . $Appname . \Puzzlout\Framework\Enums\ApplicationFolderName::Generated, BaseClassGenerator::ClassDescriptionKey => "Lists the constants for application controller classes to autocompletion and easy coding.", ConstantsClassGeneratorBase::DoGenerateConstantKeysKey => true, ConstantsClassGeneratorBase::DoGenerateGetListMethodKey => true); $this->GenerateApplicationFile($ApplicationControllers); }