CMC for PHP
  • Namespace
  • Class
  • Tree

Namespaces

  • cmc
    • core
      • ui
    • db
      • mysqli
    • error
    • ui
      • widgets
  • PHP

Classes

  • app
  • cmc
  • dftconfig
  • sess

Functions

  • app
  • qry
  • sess

CMC for PHP is a web framework for PHP.
Copyright (c) 2014 by Calmarsoft company http://calmarsoft.com (FRANCE). All rights reserved.
Project information available here.

Class dftconfig

Default configuration options

Abstract
Namespace: cmc
Located at dftconfig.php

Methods summary

public static boolean
# SESS_path( string $path )

custom function to define urls for which we need to keep session information returns true if this is a session-bound path

custom function to define urls for which we need to keep session information returns true if this is a session-bound path

Parameters

$path
string
$path the request path

Returns

boolean
public static
# setConfig( string $key, string $config )

updates an entry in the user configuration items

updates an entry in the user configuration items

Parameters

$key
string
$key
$config
string
$config
public static type
# val( type $key, mixed $dft = null )

retrieves an entry in the user configuration items

retrieves an entry in the user configuration items

Parameters

$key
type
$key
$dft

Returns

type
public static string
# getUrlForm( )

defines the url form as a regular expression, to choose where to place the language part

defines the url form as a regular expression, to choose where to place the language part

default is #^(?:/|)($lang)/(.*)#
(means lang/path_of_view)

Returns

string
public static string
# buildUrlLang( string $lang, string $url )

defines how to add a language in a non-localized url

defines how to add a language in a non-localized url

returns the localized url caution must be taken to be consistent with getUrlFrom function

Parameters

$lang
string
$lang
$url
string
$url

Returns

string
public static
# Request_Filter( cmc\core\request $req )

used to alter the request (a view from another, redirections, ...)

used to alter the request (a view from another, redirections, ...)

Parameters

$req
cmc\core\request
$req
public static boolean
# MAT_valid( string $path )

filters if a material path is valid

filters if a material path is valid

Parameters

$path
string
$path

Returns

boolean
public static boolean
# TIME_Banner( string $path )

displays the performance banner (timings/memory) depending on the material path

displays the performance banner (timings/memory) depending on the material path

Parameters

$path
string
$path

Returns

boolean
public static
# getAjaxImagePath( )

materials files extension

materials files extension

public static
# dateToISO( mixed $d )
public static
# dateFromISO( mixed $d )

Magic methods summary

Constants summary

boolean databaseErrFatal true
#

is a database error fatal, or do we attempt to continue the view's rendering?

is a database error fatal, or do we attempt to continue the view's rendering?

string errorHandle cmc\error\runtimeErrors::H_Fatal
#

Action for errors: Fatal, Log, ...

Action for errors: Fatal, Log, ...

integer errorDefaultMask E_WARNING
#

Errors to ignore default is E_WARNING

Errors to ignore default is E_WARNING

string DFT_translation 'en'
#

default language in case of unavailable translation in requested language

default language in case of unavailable translation in requested language

boolean checkUtf8BOM true
#

do we check if the UTF-8 is present in the view, and adds it if necessary ?

do we check if the UTF-8 is present in the view, and adds it if necessary ?

string VW_APARENT 'data-cmc-parent'
#

custom attribute used to name of the parent material

custom attribute used to name of the parent material

string VW_APOSITION 'data-cmc-position'
#

custom attribute for child/parent relationship

custom attribute for child/parent relationship

in a parent material, defines where to place the child material
in a child material, defines the VW_APOSITION value to be used in the parent

example:
Child: <div class="cmc-material" data-cmc-id="products" data-cmc-parent="model" data-cmc-position="page_mcontent">
Parent: <section class="cmc-sect" data-cmc-position="page_mcontent">

string VW_ACMCID 'data-cmc-id'
#

custom attribute for defining section or view id

custom attribute for defining section or view id

Defines the id of the material, following the view path scheme

  • can be used to seek for a child material (if not found the current text will be used)
  • a frame can be associated to it

See

cmc\ui\frame::getId()
string VW_CSECT 'cmc-sect'
#

classname to indicate that this is a subsection

classname to indicate that this is a subsection

to be used with VW_ACMCID attribute

string VW_MERGEITEM 'cmc-merge'
#

classname for advanced material merge: items outside of sections to be merged with the 'master'.

classname for advanced material merge: items outside of sections to be merged with the 'master'.

Useful for title, keywords, ... in the <head> section

string VW_ADDITEM 'cmc-add'
#

classname advanced material merge: items outside of sections to be added into the 'master'.

classname advanced material merge: items outside of sections to be added into the 'master'.

Useful for additional styles specific to a view ...

string VW_REPLACEITEM 'cmc-replace'
#

classname for advanced material merge: items outside of sections to replaced with the 'master'.

classname for advanced material merge: items outside of sections to replaced with the 'master'.

Useful for title, keywords, ...

string MAT_path 'views/'
#

root location of material files

root location of material files

boolean URL_absolute true
#

url form when rewritten (by core\ui\documentFrame class). false value is not recommended in general, and not supported in REST applications default: true

url form when rewritten (by core\ui\documentFrame class). false value is not recommended in general, and not supported in REST applications default: true

boolean APP_cache false
#

Application cache option When enabled, the static version of views and frames are kept

Application cache option When enabled, the static version of views and frames are kept

boolean SESS_save true
#

Session cache option When enabled, saves the session object. This is mandatory for applications

Session cache option When enabled, saves the session object. This is mandatory for applications

boolean SESS_save_mat false
#

Session material part option When enabled, the material (the page) is saved with the session. This consumes some space while avoiding the need of recalculating the Html page in dynframe::viewUpdate

Session material part option When enabled, the material (the page) is saved with the session. This consumes some space while avoiding the need of recalculating the Html page in dynframe::viewUpdate

boolean poweredBy true
#

'powered by' banner value. 'true' for default content, or a string for a custom content

'powered by' banner value. 'true' for default content, or a string for a custom content

string VIEW_EXT '.html'
#
integer cmcStrictHTML 0
#

materials HTML strictness
if equals 0, the HTML text is 'fixed' during parse

materials HTML strictness
if equals 0, the HTML text is 'fixed' during parse

boolean RenderHtml_Trim true
#

is HTML rendering stripping uneccessary spaces?

is HTML rendering stripping uneccessary spaces?

boolean RenderHtml_Format true
#

is HTML rendering reformating HTML

is HTML rendering reformating HTML

boolean FixHtml_httplinks true
#

if true, all http:// or https:// links in view will be replaced by //

if true, all http:// or https:// links in view will be replaced by //

boolean jQueryFixVersion true
#

if true changes jquery version (google CDN) from the running client

if true changes jquery version (google CDN) from the running client

boolean jQueryAutoMinify true
#

automatic place 'min' in case of jQuery CDN detection

automatic place 'min' in case of jQuery CDN detection

boolean jQueryAutoLatest true
#

use a 'latest' version

use a 'latest' version

string jQueryLegacyLatest '1.11.1'
#

latest IE7/8 compatible jQuery version

latest IE7/8 compatible jQuery version

string jQueryLatest '2.1.1'
#

latest jQuery version

latest jQuery version

boolean Javascript_DelayLoad false
#

if true automatically generates delay load of javascript files

if true automatically generates delay load of javascript files

boolean MAT_scriptmove true
#

are javascripts sections put together in bottom?

are javascripts sections put together in bottom?

string MAT_scriptcodeid 'cmc-code'
#

custom attribute for component script item

custom attribute for component script item

string MAT_scriptbegin 'cmc-scripthead'
#

custom attribute of heading part id of the <div> that contains the script

custom attribute of heading part id of the <div> that contains the script

string MAT_scriptend 'cmc-scripttail'
#
string MAT_scriptclass 'latescript'
#

class for scripts to be moved to scripttail part

class for scripts to be moved to scripttail part

string MAT_scriptignclass 'nomove'
#

class for imutable script; items will be kept in the initial place

class for imutable script; items will be kept in the initial place

string POST_elem "cmcdata"
#

name of JSON part of POST in case of multipart POST request (typically uploading files) must match javascript component (cmc.js)

name of JSON part of POST in case of multipart POST request (typically uploading files) must match javascript component (cmc.js)

string lc_date 'd/m/Y'
#

Properties summary

public static mixed $userConfig
#
CMC for PHP API documentation generated by ApiGen 2.8.0