CaMykS  1.0-20181201
 All Classes Files Functions Variables Pages
Public Member Functions | Public Attributes | Private Member Functions | Private Attributes | List of all members
Camyks Class Reference

Public Member Functions

 __construct ($site_conf, $mode=CAMYKS_MODE_SITE)
 
 execute ()
 
 initialise ()
 
 get_siteInit ()
 
 get_adminInit ()
 
 set_confValue ($confName, $value='')
 
 get_confValue ($confName, $default='')
 
 update_siteConfFile ($params=array())
 
 add_translation ($path, $lang=null)
 
 add_generic_translation ($more='', $language=null)
 
 get_translation ($string, $data=array())
 
 get_currentLanguage ($type)
 
 decode_value ($v)
 
 encode_value ($v)
 
 get_htmlEncodingValue ()
 
 get_mysqlEncodingValue ()
 
 get_modules ()
 
 get_themes ()
 
 get_templates ()
 
 get_inputs ()
 
get_module ($moduleName)
 
get_theme ($themeName)
 
get_template ($templateName)
 
get_input ($inputName)
 
 get_neededPlugins ()
 
 get_pluginPath ($path_type)
 
 get_pluginURL ($path_type)
 
 get_adminUser ()
 
 check_adminUser ()
 
 get_cache ($title)
 
 set_cache ($title, $content, $desc= '')
 
 check_deviceMode ($device='')
 
 throwFatalError ($error)
 
 are_logsAvailable ()
 
 log ($object, $action, $message='')
 
 log_event ($type, &$object, $desc1='', $desc2='', $file='', $line=0)
 
 log_sqlerror (&$object, $sqlquery='', $file='', $line=0)
 
 log_internalerror (&$object, $desc1='', $desc2='', $file='', $line=0)
 
 log_information (&$object, $desc1='', $desc2='')
 
 log_executionerror (&$object, $desc1='', $desc2='')
 
 update_statistic ($name='', $module='', $type='', $main='', $data1='', $data2='', $params=array())
 
 update_siteStatistics ()
 
 get_databaseConnection ()
 
get_dbConnection ()
 
 register_dbConnection (&$connection)
 
 set_sessionValue ($name, $value='')
 
 get_sessionValue ($name, $value=null)
 
 kill_session ()
 
 get_executionVariable ($name)
 
 set_executionVariable ($name, $value)
 
 set_sharedData ($name, $data=null, $sub=null)
 
 get_sharedData ($name=null, $value=null)
 
 check_sharedData ($name)
 
 register_sharedObject ($name, &$object)
 
get_sharedObject ($name)
 
 get_sharedObjectList ()
 
 Register_asExtension ($plugin, $ext_name, $ext_type)
 
 get_registeredExtensions ($plugin)
 
 register_eventHandler ($event, &$plugin)
 
 get_rootBaseURL ($mode=null)
 
 get_defaultBaseURL ($mode=null)
 
 get_fileURL ($file='', $mode=null)
 
 get_dataFileURL ($file, $full=null, $default='')
 
 get_dataFilePath ($file)
 
 terminate ()
 
 get_adminLink ($module='', $params=array())
 
 get_adminJSLink ($module='', $params=array())
 
 get_requestLink ($params=array())
 
 get_requestJSLink ($params=array())
 
 get_siteLink ($page, $name='', $lg='', $params=array())
 
 get_siteHomepageLink ()
 
 get_siteCurrentLink ($lg='', $params=null)
 
 get_siteKeypageLink ($key='', $lg='', $params=null)
 
 get_siteLinkEncodeParams ($params)
 
 get_siteLinkDecodeParams ($params)
 
 get_requestPageContent ()
 
 get_availableLanguages ()
 
 init_kill ()
 
 get_siteLinkByName ($name, $lg='', $params=array())
 

Public Attributes

 $name = CAMYKS_NAME
 CaMykS object name. More...
 
 $title = CAMYKS_NAME
 CaMykS object title. More...
 
 $object_type = CAMYKS_NAME
 CaMykS object type. More...
 
 $version
 CaMykS current version. More...
 
 $last_modification_date
 CaMykS last modification date. More...
 
 $site_name
 CaMykS current site name. More...
 
 $mode
 CaMykS running mode (admin / site / manager / install). More...
 
 $trads = array()
 CaMykS merged locales. More...
 
 $camyks_path
 CaMykS path. More...
 
 $camyks_plugin_path
 CaMykS plugins path. More...
 
 $camyks_plugin_url
 CaMykS plugins base url. More...
 
 $camyks_engine_path
 CaMykS libraries path. More...
 
 $site_path
 Current site path. More...
 
 $site_plugin_path
 Current site plugins path. More...
 
 $site_plugin_url
 Current site plugins base url. More...
 
 $site_cache_path
 Current site cache path. More...
 
 $site_data_url
 Current site data folder base url. More...
 
 $site_base_url
 Current site base url. More...
 
 $db_table_prefix
 Database tables prefix. More...
 
 $db_conn
 Main database connection. More...
 
 $file_extension
 Files extension. More...
 
 $modules
 CaMykS modules. More...
 
 $templates
 CaMykS templates. More...
 
 $themes
 CaMykS themes. More...
 
 $inputs
 CaMykS inputs. More...
 
 $theme
 CaMykS current theme. More...
 
 $current_language
 CaMykS current language. More...
 
 $cache = array()
 CaMykS cache. More...
 
 $shared_data = array()
 CaMykS shared data. More...
 
 $sharedObjects = array()
 CaMykS shared objects. More...
 
 $plugin_extensions = array()
 CaMykS plugins extensions. More...
 
 $HTMLPage
 CaMykS HTML page. More...
 
 $contentPage
 CaMykS content page. More...
 
 $previewMode
 CaMykS current preview mode. More...
 
 $deviceMode
 CaMykS current device mode. More...
 
 $adminUser = false
 Current logged admin user. More...
 

Private Member Functions

 get_genericInit ()
 
 get_requestInit ()
 
 get_installInit ()
 
 get_managerInit ()
 
 get_confFiles ()
 
 get_camyksPathes ()
 
 get_libs ()
 
 get_sitePathes ()
 
 check_security ($mode)
 
 check_siteConf ()
 
 check_adminConf ()
 
 get_plugins ()
 
 check_plugins ()
 
 load_neededPlugins ()
 
 run_eventHandlers ($event)
 
 get_pageContent ()
 
 get_sitePageContent ()
 
 get_adminPageContent ()
 
 get_managerPageContent ()
 
 get_installPageContent ()
 

Private Attributes

 $openedDBonnections = array()
 CaMykS opened database connections. More...
 
 $eventsHandlers
 CaMykS event handlers. More...
 
 $falseRef = false
 CaMykS false value as reference. More...
 

Detailed Description

CaMykS master class.

Author
CaMykS Team camyk.nosp@m.s.co.nosp@m.ntact.nosp@m.@gma.nosp@m.il.co.nosp@m.m

Constructor & Destructor Documentation

Camyks::__construct (   $site_conf,
  $mode = CAMYKS_MODE_SITE 
)

CaMykS Constructor.

Parameters
array$site_conf
integer$mode

Member Function Documentation

Camyks::add_generic_translation (   $more = '',
  $language = null 
)

Load an internal dictionnary.

Parameters
string$more
string$language
Returns
void
Camyks::add_translation (   $path,
  $lang = null 
)

Load dictionnary from its path.

Parameters
string$path
string$lang
Returns
void
Camyks::are_logsAvailable ( )

Check is log manager module is available

Returns
boolean result.
Camyks::check_adminConf ( )
private

Check admin configuration.

Returns
void
Camyks::check_adminUser ( )

Check if admin user is connected.

Returns
boolean result
Camyks::check_deviceMode (   $device = '')

Check selected device mode value.

Parameters
string$device
Returns
void
Camyks::check_plugins ( )
private

Compare active plugins and required plugins.

Returns
void
Camyks::check_security (   $mode)
private

Check security.

Parameters
string$mode
Returns
void
Camyks::check_sharedData (   $name)

Check some shared data.

Parameters
string$name
Returns
boolean result
Camyks::check_siteConf ( )
private

Check site configuration.

Returns
void
Camyks::decode_value (   $v)

Return decoded value.

Parameters
mixed$v
Returns
mixed
Camyks::encode_value (   $v)

Return encoded value.

Parameters
mixed$v
Returns
mixed
Camyks::execute ( )

Execute CaMykS.

Returns
void
Camyks::get_adminInit ( )

Initialise CaMykS in admin mode.

Returns
void
Camyks::get_adminJSLink (   $module = '',
  $params = array() 
)

Return JavaScript admin mode link.

Parameters
string$module
array$params
Returns
string
Camyks::get_adminLink (   $module = '',
  $params = array() 
)

Return HTML admin mode link.

Parameters
string$module
array$params
Returns
string
Camyks::get_adminPageContent ( )
private

Build page content in admin mode.

Returns
void
Camyks::get_adminUser ( )

Load admin user from session.

Returns
void
Camyks::get_availableLanguages ( )

Return available languages

Deprecated:
Returns
array
Camyks::get_cache (   $title)

Return cache file.

Parameters
string$title
Returns
mixed
Camyks::get_camyksPathes ( )
private

Initialise required CaMykS pathes.

Returns
void
Camyks::get_confFiles ( )
private

get CaMykS conf files

Returns
void
Camyks::get_confValue (   $confName,
  $default = '' 
)

Return a configuration value.

Parameters
string$confName
mixed$default
Returns
mixed
Camyks::get_currentLanguage (   $type)

Manage the language to use.

Parameters
string$type
Returns
void
Camyks::get_databaseConnection ( )

Create connection to the database.

Returns
boolean success
Camyks::get_dataFilePath (   $file)

Return data file path.

Parameters
string$file
Returns
string
Camyks::get_dataFileURL (   $file,
  $full = null,
  $default = '' 
)

Return data file URL.

Parameters
string$file
boolean$full
string$default
Returns
string access public
& Camyks::get_dbConnection ( )

Return database connection.

Returns
Object
Camyks::get_defaultBaseURL (   $mode = null)

Return default base url.

Parameters
mixed$mode
Returns
$string
Camyks::get_executionVariable (   $name)

Get variable from session or header

Parameters
string$name
Returns
mixed
Camyks::get_fileURL (   $file = '',
  $mode = null 
)

Return file url.

Parameters
string$file
string$mode
Returns
$string
Camyks::get_genericInit ( )
private

CaMykS generic initialisation.

Returns
void
Camyks::get_htmlEncodingValue ( )

Return HTML value for encoding.

Returns
string
& Camyks::get_input (   $inputName)

return input object.

Parameters
string$inputName
Returns
Input
Camyks::get_inputs ( )

Load inputs list in CaMykS object.

Returns
void
Camyks::get_installInit ( )
private

Initialise CaMykS in install mode.

Returns
void
Camyks::get_installPageContent ( )
private

Build content in install mode.

Returns
void
Camyks::get_libs ( )
private

Load all internal libs files.

Returns
void
Camyks::get_managerInit ( )
private

Initialise CaMykS in manager mode.

Returns
void
Camyks::get_managerPageContent ( )
private

Build page content in manager mode.

Returns
void
& Camyks::get_module (   $moduleName)

Return module object.

Parameters
string$moduleName
Returns
Module
Camyks::get_modules ( )

Load modules list in CaMykS object.

Returns
void
Camyks::get_mysqlEncodingValue ( )

Return SQL value for encoding.

Returns
string
Camyks::get_neededPlugins ( )

Load needed plugins list from CaMykS configuration.

Returns
void
Camyks::get_pageContent ( )
private

Build page content.

Returns
void
Camyks::get_pluginPath (   $path_type)

Return plugin path case of plugin path type.

Parameters
string$path_type
Returns
string
Camyks::get_plugins ( )
private

Get all available and active plugins.

Returns
void
Camyks::get_pluginURL (   $path_type)

Return plugin url case of plugin path type.

Parameters
string$path_type
Returns
string
Camyks::get_registeredExtensions (   $plugin)

Get registered extensions.

Parameters
string$plugin
Returns
array
Camyks::get_requestInit ( )
private

Initialise CaMykS in request mode.

Returns
void
Camyks::get_requestJSLink (   $params = array())

Return JavaScript request mode link.

Parameters
array$params
Returns
string
Camyks::get_requestLink (   $params = array())

Return HTML request mode link.

Parameters
array$params
Returns
string
Camyks::get_requestPageContent ( )

Build page content in request mode.

Returns
void
Camyks::get_rootBaseURL (   $mode = null)

Return root base url.

Parameters
string$mode
Returns
string
Camyks::get_sessionValue (   $name,
  $value = null 
)

Get var from session.

Parameters
string$name
mixed$value
Returns
void
Camyks::get_sharedData (   $name = null,
  $value = null 
)

Get a shared data.

Parameters
string$name
mixed$value
Returns
mixed
& Camyks::get_sharedObject (   $name)

Return requested shared object.

Parameters
string$name
Returns
Object
Camyks::get_sharedObjectList ( )

Return shared object name list.

Returns
array
Camyks::get_siteCurrentLink (   $lg = '',
  $params = null 
)

Return site mode link based on current one.

Parameters
string$lg
array$params
Returns
string
Camyks::get_siteHomepageLink ( )

Return home page link in site mode.

Returns
string
Camyks::get_siteInit ( )

Initialise CaMykS in site mode.

Returns
void
Camyks::get_siteKeypageLink (   $key = '',
  $lg = '',
  $params = null 
)

Return site mode link to key page.

Parameters
string$key
string$lg
array$params
Returns
string
Camyks::get_siteLink (   $page,
  $name = '',
  $lg = '',
  $params = array() 
)

Return site mode link.

Parameters
mixed$page
string$name
string$lg
array$params
Returns
string
Camyks::get_siteLinkByName (   $name,
  $lg = '',
  $params = array() 
)

Return site mode link based name.

Deprecated:
See also
get_siteLink()
Parameters
string$name
string$lg
array$params
Returns
string
Camyks::get_siteLinkDecodeParams (   $params)

Return decoded params for link.

Parameters
string$params
Returns
array
Camyks::get_siteLinkEncodeParams (   $params)

Return encoded params for link.

Parameters
array$params
Returns
string
Camyks::get_sitePageContent ( )
private

Build page content in site mode.

Returns
void
Camyks::get_sitePathes ( )
private

Initialise needed site pathes.

Returns
void
& Camyks::get_template (   $templateName)

return template object.

Parameters
string$templateName
Returns
Template
Camyks::get_templates ( )

Load templates list in CaMykS object.

Returns
void
& Camyks::get_theme (   $themeName)

Return theme object.

Parameters
string$themeName
Returns
Theme
Camyks::get_themes ( )

Load themes list in CaMykS object.

Returns
void
Camyks::get_translation (   $string,
  $data = array() 
)

Return localisation values.

Parameters
string$string
mixed$data
Returns
string
Camyks::init_kill ( )

Start closing CaMykS object.

Deprecated:
Returns
void
See also
terminate()
Camyks::initialise ( )

CaMykS global initialisation.

Returns
void
Camyks::kill_session ( )

close session.

Returns
void
Camyks::load_neededPlugins ( )
private

Load needed plugins.

Returns
void
Camyks::log (   $object,
  $action,
  $message = '' 
)

Log message in log manager module.

Parameters
string$object
string$action
string$message
Camyks::log_event (   $type,
$object,
  $desc1 = '',
  $desc2 = '',
  $file = '',
  $line = 0 
)

Log event in system report module.

Parameters
string$type
Object$object
string$desc1
string$desc2
string$file
integer$line
Returns
boolean success
Camyks::log_executionerror ( $object,
  $desc1 = '',
  $desc2 = '' 
)

Log execution error in system report module.

Parameters
object$object
string$desc1
string$desc2
Returns
boolean success
Camyks::log_information ( $object,
  $desc1 = '',
  $desc2 = '' 
)

Log information in system report module.

Parameters
object$object
string$desc1
string$desc2
Returns
boolean success
Camyks::log_internalerror ( $object,
  $desc1 = '',
  $desc2 = '',
  $file = '',
  $line = 0 
)

Log internal error in system report module.

Parameters
object$object
string$desc1
string$desc2
string$file
integer$line
Returns
boolean success
Camyks::log_sqlerror ( $object,
  $sqlquery = '',
  $file = '',
  $line = 0 
)

Log sql error in system report module.

Parameters
Object$object
string$sqlquery
string$file
integer$line
Returns
boolean success
Camyks::Register_asExtension (   $plugin,
  $ext_name,
  $ext_type 
)

Register a plugin as an extension to another.

Parameters
string$plugin
string$ext_name
string$ext_type
Returns
void
Camyks::register_dbConnection ( $connection)

Register an opened connection.

Parameters
Object$connection
Returns
void
Camyks::register_eventHandler (   $event,
$plugin 
)

Register an event handler.

Parameters
string$event
Object$plugin
Returns
void
Camyks::register_sharedObject (   $name,
$object 
)

Register a plugin to be accessed by any other.

Parameters
string$name
Plugin$object
Returns
boolean success
Camyks::run_eventHandlers (   $event)
private

Run event handlers.

Parameters
string$event
Returns
void
Camyks::set_cache (   $title,
  $content,
  $desc = '' 
)

Set cache file.

Parameters
string$title
mixed$content
string$desc
Returns
void
Camyks::set_confValue (   $confName,
  $value = '' 
)

Define/update configuration value.

Parameters
string$confName
mixed$value
Returns
void
Camyks::set_executionVariable (   $name,
  $value 
)

Set variable to session

Parameters
string$name
mixed$value
Returns
void
Camyks::set_sessionValue (   $name,
  $value = '' 
)

Save var to session.

Parameters
string$name
mixed$value
Returns
void
Camyks::set_sharedData (   $name,
  $data = null,
  $sub = null 
)

Set a shared data.

Parameters
string$name
mixed$data
string$sub
Returns
void
Camyks::terminate ( )

Finish closing CaMykS object.

Returns
void
Camyks::throwFatalError (   $error)

Stop CaMykS, with an error.

Parameters
array$error
Camyks::update_siteConfFile (   $params = array())

Update configuration file.

Parameters
array$params
Returns
boolean result
Camyks::update_siteStatistics ( )

Update site statistics.

Returns
void
Camyks::update_statistic (   $name = '',
  $module = '',
  $type = '',
  $main = '',
  $data1 = '',
  $data2 = '',
  $params = array() 
)

Try to update statistic.

Parameters
string$name
string$module
string$type
string$main
string$data1
strint$data2
array$params
Returns
void

Member Data Documentation

mixed Camyks::$adminUser = false

Current logged admin user.

array Camyks::$cache = array()

CaMykS cache.

string Camyks::$camyks_engine_path

CaMykS libraries path.

string Camyks::$camyks_path

CaMykS path.

string Camyks::$camyks_plugin_path

CaMykS plugins path.

string Camyks::$camyks_plugin_url

CaMykS plugins base url.

ContentPage Camyks::$contentPage

CaMykS content page.

string Camyks::$current_language

CaMykS current language.

Database_connection Camyks::$db_conn

Main database connection.

string Camyks::$db_table_prefix

Database tables prefix.

string Camyks::$deviceMode

CaMykS current device mode.

array Camyks::$eventsHandlers
private

CaMykS event handlers.

boolean Camyks::$falseRef = false
private

CaMykS false value as reference.

string Camyks::$file_extension

Files extension.

HTMLPage Camyks::$HTMLPage

CaMykS HTML page.

array Camyks::$inputs

CaMykS inputs.

integer Camyks::$last_modification_date

CaMykS last modification date.

string Camyks::$mode

CaMykS running mode (admin / site / manager / install).

array Camyks::$modules

CaMykS modules.

string Camyks::$name = CAMYKS_NAME

CaMykS object name.

string Camyks::$object_type = CAMYKS_NAME

CaMykS object type.

array Camyks::$openedDBonnections = array()
private

CaMykS opened database connections.

array Camyks::$plugin_extensions = array()

CaMykS plugins extensions.

string Camyks::$previewMode

CaMykS current preview mode.

array Camyks::$shared_data = array()

CaMykS shared data.

array Camyks::$sharedObjects = array()

CaMykS shared objects.

string Camyks::$site_base_url

Current site base url.

string Camyks::$site_cache_path

Current site cache path.

string Camyks::$site_data_url

Current site data folder base url.

string Camyks::$site_name

CaMykS current site name.

string Camyks::$site_path

Current site path.

string Camyks::$site_plugin_path

Current site plugins path.

string Camyks::$site_plugin_url

Current site plugins base url.

array Camyks::$templates

CaMykS templates.

Theme Camyks::$theme

CaMykS current theme.

array Camyks::$themes

CaMykS themes.

string Camyks::$title = CAMYKS_NAME

CaMykS object title.

array Camyks::$trads = array()

CaMykS merged locales.

string Camyks::$version

CaMykS current version.


The documentation for this class was generated from the following file: