Methods summary
	
		| 
			 public 
			
			
			 | 
		#
		__construct( integer $idmod = NULL )
			Constructor to create an instance of this class. 
			Constructor to create an instance of this class. With this class you can create a new module, rename a module. You can save a
Output from modules and Input in a file. The save rules are [Modulname] (is
unique) the files input and output will be named [Modulname]_input.php, and
[Modulname]_output.php respectivly. Parameters
					$idmodinteger$idmod [optional] the id of the module
Throws
					cExceptionif the module directory can not be created
				 | 
	
		| 
			 public static
			mixed
			
			 | 
		#
		getEncoding( integer $overrideLanguageId = 0 )
			
		 
			
				Parameters
					$overrideLanguageIdinteger$overrideLanguageId [optional]
Returns
					mixed
 Throws | 
	
		| 
			 public 
			boolean
			
			 | 
		#
		modulePathExistsInDirectory( string $name )
			Exist the modulname in directory. 
			Exist the modulname in directory. ParametersReturns
					boolean
 | 
	
		| 
			 public 
			string|boolean
			
			 | 
		#
		saveContentToFile( string $templateName, string $fileType, string $fileContent, string $saveDirectory = 'cache' )
			Save a content in the file, use for css/js. 
			Save a content in the file, use for css/js. Parameters
					$templateNamestring$templateName
$fileTypestring$fileType
$fileContentstring$fileContent
$saveDirectorystring$saveDirectory [optional]
Returns
					string|booleanURL on success or false on failure
 
 Throws | 
	
		| 
			 public static
			string
			
			 | 
		#
		getCleanName( string $name, string $defaultChar = '_' )
			Get the cleaned name. Parameters
					$namestring$name mod name
$defaultCharstring$defaultChar [optional] default character
Returns
					string
 | 
	
		| 
			 public 
			
			
			 | 
		#
		initWithDatabaseRow( mixed $db )
			Init the vars of the class. 
			Init the vars of the class. Parameters | 
	
		| 
			 protected 
			
			
			 | 
		#
		_initByModule( integer $idmod = NULL )
			Init the vars of the class, make a query to the Db. 
			Init the vars of the class, make a query to the Db. Parameters
					$idmodinteger$idmod [optional] the id of the modul
 | 
	
		| 
			 public 
			string
			
			 |  | 
	
		| 
			 public 
			string
			
			 | 
		#
		getModulePath( )
			Get the Modul Path also cms path + module + module name. 
			Get the Modul Path also cms path + module + module name. Returns
					string
 | 
	
		| 
			 public 
			string
			
			 | 
		#
		getTemplatePath( string $file = '' )
			Get the template path. If file is set it will return the complete path + file. Parameters
					$filestring$file [optional]
Returns
					string
 | 
	
		| 
			 public 
			string
			
			 | 
		#
		getCssPath( )
			Get the css path of the modul. 
			Get the css path of the modul. Returns
					string
 | 
	
		| 
			 public 
			string
			
			 | 
		#
		getPhpPath( )
			Get the php path of the modul. 
			Get the php path of the modul. Returns
					string
 | 
	
		| 
			 public 
			string
			
			 | 
		#
		getJsPath( )
			Get the js path of the modul. 
			Get the js path of the modul. Returns
					string
 | 
	
		| 
			 public 
			string
			
			 | 
		#
		getCssFileName( )
			Get the main css file modulenam.css. 
			Get the main css file modulenam.css. Returns
					string
 | 
	
		| 
			 protected 
			string
			
			 | 
		#
		getRandomCharacters( integer $count )
			Returns random characters. 
			Returns random characters. Parameters
					$countinteger$count amount of characters
Returns
					string
 | 
	
		| 
			 public 
			boolean
			
			 | 
		#
		existFile( string $type, string $fileName )
			Check if exist a file. Parameters
					$typestring$type js | template | css the directory of the file
$fileNamestring$fileName file name
Returns
					boolean
 | 
	
		| 
			 public 
			boolean
			
			 | 
		#
		deleteFile( string $type, string $fileName )
			Delete file. Parameters
					$typestring$type js |template | css directory of the file
$fileNamestring$fileName file name
Returns
					boolean
 | 
	
		| 
			 public 
			boolean
			
			 | 
		#
		createModuleFile( string $type, string $fileName = NULL, string $content = '' )
			Create and save new file. 
			Create and save new file. Parameters
					$typestring$type css | js | template directory of the file
$fileNamestring$fileName [optional] file name
$contentstring$content [optional] content of the file
Returns
					booleantrue on success or false on failure
 
 Throws | 
	
		| 
			 public 
			boolean
			
			 | 
		#
		renameModuleFile( string $type, string $oldFileName, string $newFileName )
			Rename a file. Parameters
					$typestring$type css | js | template directory of the file
$oldFileNamestring$oldFileName old name of the file
$newFileNamestring$newFileName the new name of the file
Returns
					booleantrue on success or false on failure
 
 | 
	
		| 
			 public 
			string
			
			 | 
		#
		getJsFileName( )
			Get the name of the main js file (modulname.js). 
			Get the name of the main js file (modulname.js). Returns
					stringthe name of the js file
 
 | 
	
		| 
			 public 
			string|boolean
			
			 | 
		#
		getFilesContent( string $directory, string $fileTyp, string $fileName = NULL )
			Get the content of file, modul js or css or template or php. 
			Get the content of file, modul js or css or template or php. Parameters
					$directorystring$directory where in module should we look
$fileTypstring$fileTyp css or js
$fileNamestring$fileName [optional]
Returns
					string|boolean
 Throws | 
	
		| 
			 protected 
			boolean
			
			 | 
		#
		_makeModuleDirectory( )
			Make main module directory. 
			Make main module directory. Returns
					booleantrue on success or false on failure
 
 Throws | 
	
		| 
			 public 
			array
			
			 | 
		#
		getAllFilesFromDirectory( string $moduleDirectory )
			Get all files from a module directory. 
			Get all files from a module directory. Parameters
					$moduleDirectorystring$moduleDirectory template css or js...
Returns
					array
 | 
	
		| 
			 public 
			
			
			 |  | 
	
		| 
			 public 
			boolean
			
			 | 
		#
		eraseModule( )
			Removes this module from the filesystem. Also deletes the version files. 
			Removes this module from the filesystem. Also deletes the version files. Returns
					booleantrue on success or false on failure
 
 Throws | 
	
		| 
			 public 
			string|boolean
			
			 | 
		#
		readInput( boolean $issource = false )
			Read the input of the file _input.php. 
			Read the input of the file _input.php. Parameters
					$issourceboolean$issource [optional]
Returns
					string|booleancontent of module input file or false on failure
 
 Throws | 
	
		| 
			 public 
			boolean|string
			
			 | 
		#
		readOutput( boolean $issource = false )
			Read the output of the file _output.php. 
			Read the output of the file _output.php. Parameters
					$issourceboolean$issource [optional]
Returns
					boolean|stringcontent of module output file or false on failure
 
 Throws | 
	
		| 
			 protected 
			boolean
			
			 | 
		#
		createModuleDirectory( string $type )
			Make a directory template/css/image/js/php if not exist. 
			Make a directory template/css/image/js/php if not exist. ParametersReturns
					booleantrue on success or false on failure
 
 Throws | 
	
		| 
			 public 
			boolean
			
			 | 
		#
		isWritable( string $fileName, string $directory )
			Can write/create a file. Parameters
					$fileNamestring$fileName file name
$directorystring$directory directory where is the file
Returns
					booleantrue on success or false on failure
 
 | 
	
		| 
			 public 
			boolean
			
			 | 
		#
		moduleWriteable( string $type )
			Check write permissions for this module. 
			Check write permissions for this module. Parameters
					$typestring$type php oder template
Returns
					boolean
 | 
	
		| 
			 public 
			boolean
			
			 | 
		#
		saveOutput( string $output = NULL )
			Save a string into the file (_output.php). 
			Save a string into the file (_output.php). Parameters
					$outputstring$output [optional]
Returns
					booleantrue on success or false on failure
 
 Throws | 
	
		| 
			 public 
			boolean
			
			 | 
		#
		saveInput( string $input = NULL )
			Save a string into the file (_input.php). 
			Save a string into the file (_input.php). Parameters
					$inputstring$input [optional]
Returns
					booleantrue on success or false on failure
 
 Throws | 
	
		| 
			 public 
			true
			
			 | 
		#
		saveInfoXML( string $moduleName = NULL, string $description = NULL, string $type = NULL, string $alias = NULL )
			This method save a xml file with modul information. If the params not set,
get the value from this. 
			This method save a xml file with modul information. If the params not set,
get the value from this. Parameters
					$moduleNamestring$moduleName [optional] name of the modul
$descriptionstring$description [optional] description of the modul
$typestring$type [optional] type of the modul
$aliasstring$alias [optional]
Returns
					trueif success else false
 
 Throws | 
	
		| 
			 public 
			boolean
			
			 | 
		#
		createModule( string $input = '', string $output = '' )
			Create a new module in the module dir. 
			Create a new module in the module dir. The module name will be [ModuleName] example Contact_Form or GoogleMaps2. Parameters
					$inputstring$input [optional]
$outputstring$output [optional]
Returns
					booleanif module exist or mkdir and saveInput and saveOutput success return true. Else
if the mkdir or saveInput or saveOutput not success return false.
 
 Throws | 
	
		| 
			 public 
			boolean
			
			 | 
		#
		renameModul( string $old, string $new )
			Rename a modul and the input and output files. 
			Rename a modul and the input and output files. Parameters
					$oldstring$old old name of the modul
$newstring$new new name of the modul
Returns
					booleantrue on success or false on failure
 
 | 
	
		| 
			 public 
			boolean
			
			 | 
		#
		modulePathExists( )
			Show if the Modul with the modul name exist in modul dir. 
			Show if the Modul with the modul name exist in modul dir. Returns
					booleanif the modul exist return true, else false
 
 | 
	
		| 
			 public 
			array
			
			 | 
		#
		testInput( )
			Test input code. Returns
					arraybool state, string errorMessage
 
 Throws | 
	
		| 
			 public 
			array
			
			 | 
		#
		testOutput( )
			Test output code. Returns
					arraybool state, string errorMessage
 
 Throws | 
	
		| 
			 protected 
			array
			
			 | 
		#
		_testCode( string $inputType )
			Test module code. Parameters
					$inputTypestring$inputType code field type, 'input' or 'output'
Returns
					arraybool state, string errorMessage
 
 Throws | 
	
		| 
			 protected 
			array
			
			 | 
		#
		_verifyCode( string $code, string $id, boolean $output = false )
			Check module php code. Parameters
					$codestring$code Code to evaluate
$idstring$id Unique ID for the test function
$outputboolean$output [optional] true if start in php mode, otherwise false
Returns
					arraybool state, string errorMessage
 
 Throws | 
	
	
	Properties summary
	
		| 
			private  
			string
		 | $_modulePath |  |  | 
	
		| 
			private  
			string
		 | $_path |  | 
			#
			
				Path to the modul dir where are all the moduls of a client
(frontendpath). 
				Path to the modul dir where are all the moduls of a client
(frontendpath). | 
	
		| 
			protected  
			integer
		 | $_idmod | NULL |  | 
	
		| 
			private  
			string
		 | $_moduleName | NULL |  | 
	
		| 
			protected  
			string
		 | $_description |  | 
			#
			
				Description of the modul. 
				Description of the modul. | 
	
		| 
			protected  
			string
		 | $_type |  |  | 
	
		| 
			protected  
			string
		 | $_moduleAlias |  | 
			#
			
				The alias name of the modul. 
				The alias name of the modul. | 
	
		| 
			protected  
			array
		 | $_directories | array(
    'css' => 'css/',
    'js' => 'js/',
    'template' => 'template/',
    'image' => 'image/',
    'lang' => 'lang/',
    'php' => 'php/'
) | 
			#
			
				The names of the modul directories. 
				The names of the modul directories. | 
	
		| 
			protected  
			array
		 | $_cfg | NULL |  | 
	
		| 
			protected  
			array
		 | $_cfgClient | NULL |  | 
	
		| 
			protected  
			integer
		 | $_client | '0' |  | 
	
		| 
			protected  
			string
		 | $_input | '' | 
			#
			
				The code of the modul input. 
				The code of the modul input. | 
	
		| 
			protected  
			string
		 | $_output | '' | 
			#
			
				The code of the modul output. 
				The code of the modul output. | 
	
		| 
			protected  
			string
		 | $_encoding | '' |  | 
	
		| 
			protected  
			string
		 | $_fileEncoding | '' | 
			#
			
				Which format of encoding should be files (input/output/translation...) 
				Which format of encoding should be files (input/output/translation...) getEffectiveSetting('encoding', 'file_encoding', 'UTF-8') | 
	
		| 
			protected  
			integer
		 | $_idlang | -1 |  | 
	
		| 
			private  
			cDb | $_db | NULL |  | 
	
		| 
			protected static 
			array
		 | $_encodingStore | array() |  |