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 )
Construct for the class cModuleHandler. With this class you can make a new Modul, rename a Modul. You can save a Output from Modul and Input in a file. The save rules are [Modulname] (is uneque) the files input and output will be named [Modulname]_input.php , [Modulname]_output.php |
public static
|
|
public
|
|
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
|
|
public
|
|
protected
|
|
public
string
|
|
public
string
|
#
getTemplatePath( string $file = '' )
Get the template path. If file is set it will return the complete paht + file |
public
string
|
|
public
string
|
|
public
string
|
|
public
string
|
|
protected
string
|
|
public
|
|
public
|
|
public
|
#
createModuleFile( string $type, string $fileName = NULL, string $content = '' )
Make and save new file |
public
boolean
|
|
public
string
|
|
public
|
#
getFilesContent( string $directory, string $fileTyp, mixed $fileName = NULL )
Get the content of file, modul js or css or template or php |
protected
boolean
|
|
public
array
|
|
public
|
|
public
boolean
|
|
public
string
|
|
public
string
|
|
protected
|
|
public
bool,
|
|
public
boolean
|
|
public
boolean
|
|
public
boolean
|
|
public
true
|
#
saveInfoXML( string $moduleName = NULL, string $description = NULL, string $type = NULL, mixed $alias = NULL )
This method save a xml file with modul information. If the params not set, get the value from this |
public
boolean
|
#
createModule( mixed $input = '', mixed $output = '' )
Make a new module into the modul dir. The modul name will be [ModulName] example Contact_Form or GoogleMaps2. |
public
boolean
|
|
public
|
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 aliac 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() |