Class cModuleHandler
Class for new modul structere. Saves the Modul-Input in a file (input.php) and Modul-Output in a file(output.php). All moduls of a clients are in [frontend]/modules/.
Direct known subclasses
cModuleFileTranslation, cModuleSearch, cModuleSynchronizer, cModuleTemplateHandlerCopyright: four for business AG <www.4fb.de>
License: http://www.contenido.org/license/LIZENZ.txt
Author: Rusmir Jusufovic
Located at classes/module/class.module.handler.php
public
|
#
__construct( integer $idmod = NULL )
Constructor for the class cModuleHandler. 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 , [Modulname]_output.php |
public static
mixed
|
|
public
boolean
|
|
public
boolean|string
|
#
saveContentToFile( string $templateName, string $fileType, string $fileContent, string $saveDirectory = 'cache' )
Save a content in the file, use for css/js |
public static
string
|
|
public
|
|
protected
|
|
public
string
|
|
public
string
|
#
getTemplatePath( string $file = '' )
Get the template path. If file is set it will return the complete path + file |
public
string
|
|
public
string
|
|
public
string
|
|
public
string
|
|
protected
string
|
|
public
boolean
|
|
public
boolean
|
|
public
boolean
|
#
createModuleFile( string $type, string $fileName = NULL, string $content = '' )
Create and save new file |
public
boolean
|
|
public
string
|
|
public
string|boolean
|
#
getFilesContent( string $directory, string $fileTyp, string $fileName = NULL )
Get the content of file, modul js or css or template or php |
protected
boolean
|
|
public
array
|
|
public
|
|
public
boolean
|
|
public
boolean|string
|
|
public
boolean|string
|
|
protected
boolean
|
|
public
boolean
|
|
public
boolean
|
|
public
boolean
|
|
public
boolean
|
|
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 |
public
boolean
|
#
createModule( string $input = '', string $output = '' )
Create a new module in the module dir. The module name will be [ModuleName] example Contact_Form or GoogleMaps2. |
public
boolean
|
|
public
boolean
|
|
public
array
|
|
public
array
|
|
protected
array
|
|
protected
array
|
|
protected static
mixed
|
private
string
|
$_modulePath |
|
#
Path to a modul dir |
private
string
|
$_path |
|
#
Path to the modul dir where are all the moduls of a client (frontendpath) |
protected
integer
|
$_idmod | NULL |
#
Id of the Modul |
private
string
|
$_moduleName | NULL |
#
The name of the modul |
protected
string
|
$_description |
|
#
Description of the modul. |
protected
string
|
$_type |
|
#
The type of the modul. |
protected
string
|
$_moduleAlias |
|
#
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. |
protected
array
|
$_cfg | NULL |
#
CONTENIDO cfg |
protected
array
|
$_cfgClient | NULL |
#
Contenido cfgClient |
protected
integer
|
$_client | '0' |
#
id of the Client |
protected
string
|
$_input | '' |
#
The code of the modul input |
protected
string
|
$_output | '' |
#
The code of the modul output |
protected
string
|
$_encoding | '' |
#
Encoding oft the site |
protected
string
|
$_fileEncoding | '' |
#
Which format of encoding should be files (input/output/translation...) getEffectiveSetting('encoding', 'file_encoding', 'UTF-8') |
protected
integer
|
$_idlang | -1 |
#
The id of the lang |
private
|
$_db | NULL |
|
protected static
array
|
$_encodingStore | array() |