Class CMS_polymod_definition_parsing

Description

Class CMS_polymod_definition_parsing

represent a polymod parsing : from a given string definition and some parameters, create HTML / PHP datas

Located in /automne/classes/modules/polymod/poly_definition_parsing.php (line 27)

CMS_grandFather
   |
   --CMS_polymod_definition_parsing
Class Constant Summary
Method Summary
 static boolean addSearchCondition ( &$search, array $tagAttributes, CMS_object_search $search)
 static mixed encloseString (mixed $var, boolean $reverse)
 static mixed encloseWithPrepareVar (mixed $var)
 static string getUniqueID ()
 static mixed prepareVar (mixed $var)
 static text replaceVars (string $text, array $replacement)
 string checkTagRequirements ( &$tag, array $requirements, array $tag)
 string computeTags (multidimentionnal $definition, [integer $level = 0])
 multidimentionnal getBlockParams ()
 string getContent ([constant $type = self::OUTPUT_RESULT],  &$parameters, array $parameters)
 string getParsingError ()
 void __construct (string $definition, [boolean $parse = true], [constant $mode = self::PARSE_MODE], [string $module = false], [integer $visualizationMode = PAGE_VISUALMODE_HTML_PUBLIC])
 text preReplaceVars (string $text, [boolean $reverse = false], [boolean $cleanNotMatches = false], [mixed $matchCallback = array('CMS_polymod_definition_parsing', 'encloseString')], [ $returnMatchedVarsArray = false], array $optionalReplacement)
 void _cacheReference (array $tag)
 void _formCallback ( &$tag, array $tag)
 string _formRequirementsTag ( &$tag, array $tag)
 string _formTag ( &$tag, array $tag)
 string _functionTag ( &$tag, array $tag)
 string _inputCallback ( &$tag, array $tag)
 string _inputTag ( &$tag, array $tag)
 string _linkObject ( &$tag, array $tag)
 string _loopTag ( &$tag, array $tag)
 string _parameterTag ( &$tag, array $tag)
 string _pluginInvalidTag ( &$tag, array $tag)
 string _pluginTag ( &$tag, array $tag)
 string _pluginValidTag ( &$tag, array $tag)
 string _pluginViewTag ( &$tag, array $tag)
 string _RSSItemContentTag ( &$tag, array $tag)
 string _RSSItemTag ( &$tag, array $tag)
 string _RSSTag ( &$tag, array $tag)
 string _searchLimitTag ( &$tag, array $tag)
 string _searchNoResultTag ( &$tag, array $tag)
 string _searchOrderTag ( &$tag, array $tag)
 string _searchParamTag ( &$tag, array $tag)
 string _searchResultTag ( &$tag, array $tag)
 string _searchTag ( &$tag, array $tag)
Methods
static addSearchCondition (line 817)

add a search condition to a given CMS_object_search object

  • return: true on success, false on failure
  • access: private
static boolean addSearchCondition ( &$search, array $tagAttributes, CMS_object_search $search)
  • CMS_object_search $search: : the reference search object which need the condition
  • array $tagAttributes: &tagAttributes : represent atm-search-param attributes
  • &$search
static encloseString (line 1698)

Enclose a given string with double quotes or single quotes according to reverse value

  • return: : the var enclosed
  • access: public
static mixed encloseString (mixed $var, boolean $reverse)
  • mixed $var: : the var to enclose
  • boolean $reverse: : enclose with double or single quotes
static encloseWithPrepareVar (line 1685)

Enclose a given var with CMS_polymod_definition_parsing::prepareVar method

  • return: : the var enclosed
  • access: public
static mixed encloseWithPrepareVar (mixed $var)
  • mixed $var: : the var to enclose
static getUniqueID (line 1710)

Return an unique ID formatted as id_rand where id is the number of unique ids queried and rand a 6 alphanumerical random characters string

  • return: the unique ID
  • access: public
static string getUniqueID ()
static prepareVar (line 1668)

Enclose a given var with quotes or return count if var is an array

  • return: : the var enclosed
  • access: public
static mixed prepareVar (mixed $var)
  • mixed $var: : the var to enclose
static replaceVars (line 1519)

Replace vars like {something}

  • return: : the text replaced
  • access: public
static text replaceVars (string $text, array $replacement)
  • string $text: : the text which need to be replaced
  • array $replacement: : optionnal replacement to do
checkTagRequirements (line 1731)

Check tags attributes requirements

  • return: indented php code
  • access: public
string checkTagRequirements ( &$tag, array $requirements, array $tag)
  • array $tag: : the reference tag to compute
  • array $requirements: : tag attributes requirements at the following format :
  • &$tag
computeTags (line 409)

Compute recursively all parsed definition tags and send them to callback methods (according to $this->_tagsCallBack)

  • return: the PHP / HTML content computed
  • access: public
string computeTags (multidimentionnal $definition, [integer $level = 0])
  • integer $level: : the current level of recursion (default : 0)
  • multidimentionnal $definition: array $definition : the definition to compute
getBlockParams (line 396)

Return block params for current definition only in self::BLOCK_PARAM_MODE

  • return: array the block params
  • access: public
multidimentionnal getBlockParams ()
getContent (line 217)

Get the parsing content only with self::PARSE_MODE

  • return: the PHP / HTML content parsed
  • access: public
string getContent ([constant $type = self::OUTPUT_RESULT],  &$parameters, array $parameters)
  • constant $type: : the content type to return in :
    • self::OUTPUT_RESULT output evalued PHP result
    • self::OUTPUT_PHP output valid PHP to execute
  • array $parameters: parameters to help parsing
  • &$parameters
getParsingError (line 385)

Return parsing errors founded during parsing test only in self::CHECK_PARSING_MODE

  • return: the parsing errors
  • access: public
string getParsingError ()
Constructor __construct (line 160)

Constructor.

initialize object.

  • access: public
void __construct (string $definition, [boolean $parse = true], [constant $mode = self::PARSE_MODE], [string $module = false], [integer $visualizationMode = PAGE_VISUALMODE_HTML_PUBLIC])
  • string $definition: the definition to parse
  • boolean $parse: : completely parse the given definition (default is true) or only replace values in it
  • constant $mode: : the current parsing mode in : self::PARSE_MODE : Parse definition (default) self::CHECK_PARSING_MODE : Check for definition parsing errors self::BLOCK_PARAM_MODE : Get definition block parameters form
  • string $module: : the current module codename which use this definition. this parameter is optionnal but it can enforce definition parsing requirements (used to verify specific modules languages for now).
  • integer $visualizationMode: The current visualization mode (see constants in cms_rc.php for accepted values).
preReplaceVars (line 1548)

Replace vars like {object:field:type} or {var|session|request|page:name:type}. Called during definition compilation

  • return: : the text replaced
  • access: public
text preReplaceVars (string $text, [boolean $reverse = false], [boolean $cleanNotMatches = false], [mixed $matchCallback = array('CMS_polymod_definition_parsing', 'encloseString')], [ $returnMatchedVarsArray = false], array $optionalReplacement)
  • string $text: : the text which need to be replaced
  • array $optionalReplacement: : optionnal replacement to do
  • boolean $cleanNotMatches: : remove vars without matches
  • mixed $matchCallback: : function name or array(object classname, object method) which represent a valid callback function to execute on matches
  • boolean $reverse: reverse : reverse single and double quotes useage (default is false : double quotes)
  • $returnMatchedVarsArray
_cacheReference (line 1438)

Compute an atm-cache-reference tag

  • access: private
void _cacheReference (array $tag)
  • array $tag: : the reference atm-cache-reference tag to compute
_formCallback (line 1415)

Compute an atm-form-callback tag

  • access: private
void _formCallback ( &$tag, array $tag)
  • array $tag: : the reference atm-form-callback tag to compute
  • &$tag
_formRequirementsTag (line 1288)

Compute an atm-form-required or atm-form-malformed tag

  • return: the PHP / HTML content computed
  • access: private
string _formRequirementsTag ( &$tag, array $tag)
  • array $tag: : the reference atm-form-required or atm-form-malformed tag to compute
  • &$tag
_formTag (line 1219)

Compute an atm-form tag

  • return: the PHP / HTML content computed
  • access: private
string _formTag ( &$tag, array $tag)
  • array $tag: : the reference atm-form tag to compute
  • &$tag
_functionTag (line 880)

Compute an atm-function tag

  • return: the PHP / HTML content computed
  • access: private
string _functionTag ( &$tag, array $tag)
  • array $tag: : the reference atm-function tag to compute
  • &$tag
_inputCallback (line 1384)

Compute an atm-input-callback tag

  • return: the PHP / HTML content computed
  • access: private
string _inputCallback ( &$tag, array $tag)
  • array $tag: : the reference atm-input-callback tag to compute
  • &$tag
_inputTag (line 1337)

Compute an atm-input tag

  • return: the PHP / HTML content computed
  • access: private
string _inputTag ( &$tag, array $tag)
  • array $tag: : the reference atm-input tag to compute
  • &$tag
_linkObject (line 1461)

Compute an atm-object-link tag

  • return: the PHP / HTML content computed
  • access: private
string _linkObject ( &$tag, array $tag)
  • array $tag: : the reference atm-object-link tag to compute
  • &$tag
_loopTag (line 933)

Compute an atm-loop tag

  • return: the PHP / HTML content computed
  • access: private
string _loopTag ( &$tag, array $tag)
  • array $tag: : the reference atm-loop tag to compute
  • &$tag
_parameterTag (line 871)

DEPRECATED : Compute an atm-parameter tag

  • return: the PHP / HTML content computed
  • access: private
string _parameterTag ( &$tag, array $tag)
  • array $tag: : the reference atm-parameter tag to compute
  • &$tag
_pluginInvalidTag (line 1062)

Compute an atm-plugin-invalid tag

  • return: the PHP / HTML content computed
  • access: private
string _pluginInvalidTag ( &$tag, array $tag)
  • array $tag: : the reference atm-plugin-invalid tag to compute
  • &$tag
_pluginTag (line 997)

Compute an atm-plugin tag

  • return: the PHP / HTML content computed
  • access: private
string _pluginTag ( &$tag, array $tag)
  • array $tag: : the reference atm-plugin tag to compute
  • &$tag
_pluginValidTag (line 1043)

Compute an atm-plugin-valid tag

  • return: the PHP / HTML content computed
  • access: private
string _pluginValidTag ( &$tag, array $tag)
  • array $tag: : the reference atm-plugin-valid tag to compute
  • &$tag
_pluginViewTag (line 1081)

Compute an atm-plugin-view tag

  • return: the PHP / HTML content computed
  • access: private
string _pluginViewTag ( &$tag, array $tag)
  • array $tag: : the reference atm-plugin-invalid tag to compute
  • &$tag
_RSSItemContentTag (line 1158)

Compute an atm-rss-item-xxx tag

  • return: the PHP / HTML content computed
  • access: private
string _RSSItemContentTag ( &$tag, array $tag)
  • array $tag: : the reference atm-rss-item-xxx tag to compute
  • &$tag
_RSSItemTag (line 1138)

Compute an atm-rss-item tag

  • return: the PHP / HTML content computed
  • access: private
string _RSSItemTag ( &$tag, array $tag)
  • array $tag: : the reference atm-rss-item tag to compute
  • &$tag
_RSSTag (line 1100)

Compute an atm-rss tag

  • return: the PHP / HTML content computed
  • access: private
string _RSSTag ( &$tag, array $tag)
  • array $tag: : the reference atm-rss tag to compute
  • &$tag
_searchLimitTag (line 747)

Compute an atm-search-page or atm-search-limit tag

  • return: the PHP / HTML content computed
  • access: private
string _searchLimitTag ( &$tag, array $tag)
  • array $tag: : the reference tag to compute
  • &$tag
_searchNoResultTag (line 666)

Compute an atm-noresult tag

  • return: the PHP / HTML content computed
  • access: private
string _searchNoResultTag ( &$tag, array $tag)
  • array $tag: : the reference atm-noresult tag to compute
  • &$tag
_searchOrderTag (line 777)

Compute an atm-search-order tag

  • return: the PHP / HTML content computed
  • access: private
string _searchOrderTag ( &$tag, array $tag)
  • array $tag: : the reference atm-search-order tag to compute
  • &$tag
_searchParamTag (line 701)

Compute an atm-search-param tag

  • return: the PHP / HTML content computed
  • access: private
string _searchParamTag ( &$tag, array $tag)
  • array $tag: : the reference atm-search-param tag to compute
  • &$tag
_searchResultTag (line 577)

Compute an atm-result tag

  • return: the PHP / HTML content computed
  • access: private
string _searchResultTag ( &$tag, array $tag)
  • array $tag: : the reference atm-result tag to compute
  • &$tag
_searchTag (line 520)

Compute an atm-search tag

  • return: the PHP / HTML content computed
  • access: private
string _searchTag ( &$tag, array $tag)
  • array $tag: : the reference atm-search tag to compute
  • &$tag

Inherited Methods

Inherited From CMS_grandFather

 CMS_grandFather::autoload()
 CMS_grandFather::hasError()
 CMS_grandFather::log()
 CMS_grandFather::PHPErrorHandler()
 CMS_grandFather::raiseError()
 CMS_grandFather::setDebug()
 CMS_grandFather::setLog()
 CMS_grandFather::_raiseError()
 CMS_grandFather::__call()
Class Constants
BLOCK_PARAM_MODE = 4 (line 33)
CHECK_PARSING_MODE = 2 (line 32)
OUTPUT_PHP = 1 (line 29)
OUTPUT_RESULT = 2 (line 30)
PARSE_MODE = 1 (line 31)

Inherited Constants

Inherited from CMS_grandFather

CMS_grandFather::ERROR_LOG
CMS_grandFather::SYSTEM_LABEL

Documentation generated on Wed, 15 Feb 2012 15:36:57 +0100 by phpDocumentor 1.4.3