public function __construct($daoObject, $queryAction, DbQueryFilters $filters)
 {
     $this->setDaoObject($daoObject);
     $this->setDaoClassName(\Puzzlout\Framework\Helpers\CommonHelper::GetFullClassName($daoObject));
     $this->setTableName(\Puzzlout\Framework\Helpers\CommonHelper::GetShortClassName($daoObject));
     $this->setType($queryAction);
     //$this->BuildSelectClause((array) $daoObject);
     //$this->BuildWhereClause($filters->whereFilters());
     $this->setFilters($filters);
 }
 /**
  * Retrieve the cultures from the database and transform the object list into
  * an associative array of following structure:
  * 
  * array(
  *    "xx-XX" => (array of F_culture_extension object),
  *    "yy-YY" => (array of F_culture_extension object),
  *    ...
  * )
  * 
  * @return associative array the array of culture
  */
 public function GetCultureArray()
 {
     $dal = $this->dal->getDalInstance();
     $dbFilters = new \Puzzlout\Framework\Dal\DbQueryFilters();
     $dbFilters->setOrderByFilters(array(\Puzzlout\Framework\BO\F_culture_extension::F_CULTURE_ID));
     $cultureObjects = $dal->selectMany(new \Puzzlout\Framework\BO\F_culture_extension(), $dbFilters);
     $cultureAssocArray = array(\Puzzlout\Framework\BO\F_culture_extension::FullArrayCultureKey => null);
     if (count($cultureObjects) > 0) {
         foreach ($cultureObjects as $cultureObj) {
             $cultureAssocArray[\Puzzlout\Framework\BO\F_culture_extension::FullArrayCultureKey][$cultureObj->F_culture_language() . '-' . $cultureObj->F_culture_region()] = \Puzzlout\Framework\Helpers\CommonHelper::CleanPrefixedkeyInAssocArray((array) $cultureObj);
         }
     }
     return $cultureAssocArray[\Puzzlout\Framework\BO\F_culture_extension::FullArrayCultureKey];
 }
 /**
  * Builds the filePath to the configuration file.
  * 
  * @param string $fileName : the file name with .xml extension.
  * @return string
  */
 public function GetConfigurationFilePath($fileName)
 {
     return "APP_ROOT_DIR" . \Puzzlout\Framework\Enums\ApplicationFolderName::AppsFolderName . \Puzzlout\Framework\Helpers\CommonHelper::GetAppName() . '/Config/' . $fileName;
 }
 protected function GetTableName($object)
 {
     return \Puzzlout\Framework\Helpers\CommonHelper::GetShortClassName($object);
 }
 private function GenerateControllerResxFiles($resources)
 {
     $this->NamespaceApplicationRootGeneratedFolder = "Applications\\" . "APP_NAME" . "\\Resources\\Controller";
     $this->DestinationFolder = \Puzzlout\Framework\Enums\ApplicationFolderName::AppsFolderName . "APP_NAME" . \Puzzlout\Framework\Enums\ApplicationFolderName::ResourceControllerFolderName;
     foreach ($resources as $moduleKey => $moduleArray) {
         $this->IsGeneratingBaseClass = true;
         foreach ($moduleArray as $cultureKey => $cultureArray) {
             if ($this->IsGeneratingBaseClass) {
                 $baseClassNamespace = $this->GenerateControllerBaseClass($moduleKey, $cultureArray);
                 $this->IsGeneratingBaseClass = false;
             }
             $culture = \Puzzlout\Framework\Helpers\CommonHelper::FindArrayFromAContainingValue($this->app->cultures, \Puzzlout\Framework\BO\F_culture::F_CULTURE_ID, (string) $cultureKey);
             $this->UpdateTheParametersForGeneration($moduleKey, $culture);
             $this->params[\Puzzlout\Framework\GeneratorEngine\Core\BaseClassGenerator::ClassDescriptionKey] = "List of the resources values for the module " . $moduleKey;
             $this->params[\Puzzlout\Framework\GeneratorEngine\Core\BaseClassGenerator::ClassDerivation] = $baseClassNamespace;
             $this->GenerateApplicationFile($cultureArray);
         }
     }
 }
 /**
  * 
  * //For Controller Resources
  *    "en" => array(
  *      "module1" => array(
  *        "common" => array(
  *          "key1" => "value1",
  *          ...
  *          "keyN" => "valueN"
  *        ),
  *        "action1" => array(
  *          "key1" => "value1",
  *          ...
  *          "keyN" => "valueN"
  *        ),
  *        "action2" => array(
  *          "key1" => "value1",
  *          ...
  *          "keyN" => "valueN"
  *        ),
  *      ),
  *      "module2" => array(
  *        "action3" => array(
  *          "key1" => "value1",
  *          ...
  *          "keyN" => "valueN"
  *        ),
  *        "action4" => array(
  *          "key1" => "value1",
  *          ...
  *          "keyN" => "valueN"
  *        ),
  *      ),
  *    ),
  *    ... repeat for other languages ...
  * );
  * 
  * @param array(of Puzzlout\Framework\BO\F_controller_resource) $resources the objects to loop through
  */
 private function OrganizeControllerResources($resources)
 {
     $assocArray = array(self::CONTROLLER_RESX_ARRAY_KEY);
     foreach ($resources as $resourceObj) {
         $cleanArray = \Puzzlout\Framework\Helpers\CommonHelper::CleanPrefixedkeyInAssocArray((array) $resourceObj);
         if (isset($assocArray[self::COMMON_RESX_ARRAY_KEY][$cleanArray[F_controller_resource::F_CONTROLLER_RESOURCE_MODULE]][$resourceObj->f_culture_id()][$cleanArray[F_controller_resource::F_CONTROLLER_RESOURCE_ACTION]][$cleanArray[F_controller_resource::F_CONTROLLER_RESOURCE_KEY]])) {
             $assocArray[self::CONTROLLER_RESX_ARRAY_KEY][$cleanArray[F_controller_resource::F_CONTROLLER_RESOURCE_MODULE]][$resourceObj->f_culture_id()][$cleanArray[F_controller_resource::F_CONTROLLER_RESOURCE_ACTION]][$cleanArray[F_controller_resource::F_CONTROLLER_RESOURCE_KEY]] = array(\Puzzlout\Framework\BO\F_controller_resource::F_CONTROLLER_RESOURCE_VALUE => $cleanArray[F_controller_resource::F_CONTROLLER_RESOURCE_VALUE], \Puzzlout\Framework\BO\F_controller_resource::F_CONTROLLER_RESOURCE_COMMENT => $cleanArray[F_controller_resource::F_CONTROLLER_RESOURCE_COMMENT]);
         } else {
             $assocArray[self::CONTROLLER_RESX_ARRAY_KEY][$cleanArray[F_controller_resource::F_CONTROLLER_RESOURCE_MODULE]][$cleanArray[\Puzzlout\Framework\BO\F_common_resource::F_CULTURE_ID]][$cleanArray[F_controller_resource::F_CONTROLLER_RESOURCE_ACTION]][$cleanArray[F_controller_resource::F_CONTROLLER_RESOURCE_KEY]] = array(\Puzzlout\Framework\BO\F_controller_resource::F_CONTROLLER_RESOURCE_VALUE => $cleanArray[F_controller_resource::F_CONTROLLER_RESOURCE_VALUE], \Puzzlout\Framework\BO\F_controller_resource::F_CONTROLLER_RESOURCE_COMMENT => $cleanArray[F_controller_resource::F_CONTROLLER_RESOURCE_COMMENT]);
         }
     }
     $this->ControllerResources = $assocArray[self::CONTROLLER_RESX_ARRAY_KEY];
 }