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
|
|
public
|
|
public
boolean
|
#
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 path + file |
public
string
|
|
public
string
|
|
public
string
|
|
public
string
|
|
protected
string
|
|
public
|
|
public
|
|
public
boolean
|
#
createModuleFile( string $type, string $fileName = NULL, string $content = '' )
Create and save new file |
public
boolean
|
|
public
string
|
|
public
|
#
getFilesContent( string $directory, string $fileTyp, $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, $alias = NULL )
This method save a xml file with modul information. If the params not set, get the value from this |
public
boolean
|
#
createModule( $input = '', $output = '' )
Make a new module into the modul dir. The modul name will be [ModulName] example Contact_Form or GoogleMaps2. |
public
boolean
|
|
public
|
|
public
|
|
public
|
|
protected
|
|
protected
array
|
|
protected static
|
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
Id of the Modul |
#
NULL
|
private
string
|
$_moduleName
The name of the modul |
#
NULL
|
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
The names of the modul directories. |
#
array(
'css' => 'css/',
'js' => 'js/',
'template' => 'template/',
'image' => 'image/',
'lang' => 'lang/',
'php' => 'php/'
)
|
protected
array
|
$_cfg
CONTENIDO cfg |
#
NULL
|
protected
array
|
$_cfgClient
Contenido cfgClient |
#
NULL
|
protected
integer
|
$_client
id of the Client |
#
'0'
|
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
The id of the lang |
#
-1
|
private
|
$_db
|
#
NULL
|
protected static
array
|
$_encodingStore
|
#
array()
|