public function cacheModuleConfig($return=false)
	{
		$modules = $this->getModulesFromDb();
		$arrayModule = array();

		foreach($modules as $module) {
			if(!in_array($module->folder, $arrayModule))
				$arrayModule[] = $module->folder;
		}
		if($return == false) {
			$filePath   = Yii::getPathOfAlias('application.config');
			$fileHandle = fopen($filePath.'/cache_module.php', 'w');
			fwrite($fileHandle, implode("\n", $arrayModule));
			fclose($fileHandle);

		} else 
			return $arrayModule;
	}
public function cacheModuleConfig($return=false)
	{
		$modules = $this->getModulesFromDb();
		$arrayModule = array();

		foreach($modules as $module) {
			if(!in_array($module->folder, $arrayModule))
				$arrayModule[] = $module->folder;
		}
		if($return == false) {
			$filePath   = Yii::getPathOfAlias('application.config');
			$fileHandle = fopen($filePath.'/cache_module.php', 'w');
			fwrite($fileHandle, implode("\n", $arrayModule));
			fclose($fileHandle);

		} else 
			return $arrayModule;
	}
public function cacheModuleConfig ( $ return = false ) { $ modules = $ this -> getModulesFromDb ( ) ; $ arrayModule = array ( ) ; foreach ( $ modules as $ module ) { if ( ! in_array ( $ module -> folder , $ arrayModule ) ) $ arrayModule [ ] = $ module -> folder ; } if ( $ return == false ) { $ filePath = Yii :: getPathOfAlias ( 'application.config' ) ; $ fileHandle = fopen ( $ filePath . '/cache_module.php' , 'w' ) ; fwrite ( $ fileHandle , implode ( "\n" , $ arrayModule ) ) ; fclose ( $ fileHandle ) ; } else return $ arrayModule ; }
Cache modul dari database ke bentuk file.
Untuk mengurangi query pada saat install ke database.
Cache modul dari database ke bentuk file . Untuk mengurangi query pada saat install ke database .