phpDocumentor pivotx
[ class tree: pivotx ] [ index: pivotx ] [ all elements ]

Class: OutputSystem

Source Location: /modules/module_outputsystem.php

Class OutputSystem

Property Summary
static mixed   $instance  
mixed   $codes  
mixed   $defaults  
mixed   $filters  

[ Top ]
Method Summary
static void   instance()   Instantiate output system
static void   _cmpCodes()   (internal) Compare two codes
static void   _cmpFilters()   (internal) Compare two filters
OutputSystem   __construct()   Construct the class
void   addCode()   Add code and enable it
void   addDefaultOptions()   Add a bunch of default options
void   addFilter()   Add a filter
void   addOptionalCode()   Add optional code, which can be enabled
void   addOptionalFilter()   Optionally add a filter
void   addTemplate()   Render a template, add the code and enable it
void   disableCode()   Disable a certain code
void   disableFilter()   Disable a filter
void   enableCode()   Enable a certain code
void   enableFilter()   Enable a filter
string   rewriteHtml()   Rewrite html
void   setCodeEnabled()   Enable or disable a certain code
void   verifyIfEnableCode()   Verify and optionally enable code

[ Top ]
Properties
static mixed   $instance = false [line 29]
API Tags:
Access:  protected


[ Top ]
mixed   $codes [line 31]
API Tags:
Access:  protected


[ Top ]
mixed   $defaults [line 33]
API Tags:
Access:  protected


[ Top ]
mixed   $filters [line 32]
API Tags:
Access:  protected


[ Top ]
Methods
static method instance  [line 63]

  static void instance( )

Instantiate output system


API Tags:
Access:  public


[ Top ]
static method _cmpCodes  [line 106]

  static void _cmpCodes( &$a, &$b  )

(internal) Compare two codes

Parameters:
   &$a: 
   &$b: 

API Tags:
Access:  public


[ Top ]
static method _cmpFilters  [line 123]

  static void _cmpFilters( &$a, &$b  )

(internal) Compare two filters

Parameters:
   &$a: 
   &$b: 

API Tags:
Access:  public


[ Top ]
Constructor __construct  [line 38]

  OutputSystem __construct( )

Construct the class


API Tags:
Access:  protected


[ Top ]
addCode  [line 189]

  void addCode( string $id, string $location, string $tag, array $_params, [string $innerhtml = '']  )

Add code and enable it

This is a shortcut method to quickly add common tags. For <script> en <style> tags certain defaults are set whenever they are not given in the $_params

Parameters:
string   $id:  id
string   $location:  where to add the code
string   $tag:  tag to add
array   $_params:  tag attributes to add
string   $innerhtml:  inner html in the tag to add

API Tags:
Access:  public


[ Top ]
addDefaultOptions  [line 75]

  void addDefaultOptions( )

Add a bunch of default options

Maybe this shouldn't be here, but it's ok for now


API Tags:
Access:  public


[ Top ]
addFilter  [line 303]

  void addFilter( $id, $callback, array $filter  )

Add a filter

Parameters:
array   $filter: 
   $id: 
   $callback: 

API Tags:
Access:  public


[ Top ]
addOptionalCode  [line 159]

  void addOptionalCode( string $id, string $location, string $tag, array $_params, [string $innerhtml = '']  )

Add optional code, which can be enabled

This is a shortcut method to quickly add common tags. For <script> en <style> tags certain defaults are set whenever they are not given in the $_params. Params is an array of attributes that get added to the tag. It also contains a few hidden attributes. An overview:

  • _priority priority of adding the code, use the constants PRI_HIGH, PRI_NORMAL or PRI_LOW (don't forget to add OutputSystem::). The changes the order in which the codes are added.
  • _ms-expression if you want to add something only for a particular IE, you can use this to add a '<!--[(expression)]> ....<![endif]-->' around the tag.

Parameters:
string   $id:  id
string   $location:  where to add the code
string   $tag:  tag to add
array   $_params:  tag attributes to add
string   $innerhtml:  inner html in the tag to add

API Tags:
Access:  public


[ Top ]
addOptionalFilter  [line 318]

  void addOptionalFilter( $id, $callback, array $filter  )

Optionally add a filter

Parameters:
array   $filter: 
   $id: 
   $callback: 

API Tags:
Access:  public


[ Top ]
addTemplate  [line 214]

  void addTemplate( string $id, string $location, $template, string $vars  )

Render a template, add the code and enable it

Parameters:
string   $id:  id
string   $location:  where to add the template code
string   $vars:  vars given to the template
   $template: 

API Tags:
Access:  public


[ Top ]
disableCode  [line 294]

  void disableCode( string $id  )

Disable a certain code

Parameters:
string   $id:  regex string for codes to disable

API Tags:
Access:  public


[ Top ]
disableFilter  [line 342]

  void disableFilter( $id  )

Disable a filter

Parameters:
   $id: 

API Tags:
Access:  public


[ Top ]
enableCode  [line 270]

  void enableCode( string $id  )

Enable a certain code

Parameters:
string   $id:  regex string for codes to enable

API Tags:
Access:  public


[ Top ]
enableFilter  [line 333]

  void enableFilter( $id  )

Enable a filter

Parameters:
   $id: 

API Tags:
Access:  public


[ Top ]
rewriteHtml  [line 354]

  string rewriteHtml( string $_html  )

Rewrite html

Parameters:
string   $_html:  the input html

API Tags:
Return:  the rewritten html
Access:  public


[ Top ]
setCodeEnabled  [line 237]

  void setCodeEnabled( string $id, [ $enable = true]  )

Enable or disable a certain code

Parameters:
string   $id:  regex string for codes to enable or disable
   $enable: 

API Tags:
Access:  protected


[ Top ]
verifyIfEnableCode  [line 283]

  void verifyIfEnableCode( string $id, callback $callback  )

Verify and optionally enable code

Add a callback which will be called on the html. If true is returned than the code will be enabled.

Parameters:
string   $id:  id
callback   $callback:  callback to verify if it should be enabled

API Tags:
Access:  public


[ Top ]
Constants
LOC_BODYEND = 'body-end' [line 27]

[ Top ]
LOC_BODYSTART = 'body-start' [line 26]

[ Top ]
LOC_HEADEND = 'head-end' [line 25]

[ Top ]
LOC_HEADSTART = 'head-start' [line 23]

[ Top ]
LOC_TITLEEND = 'title-end' [line 24]

[ Top ]
PRI_HIGH = 100 [line 20]

[ Top ]
PRI_LOW = 900 [line 22]

[ Top ]
PRI_NORMAL = 500 [line 21]

[ Top ]

Documentation generated on Tue, 05 Sep 2017 01:06:08 +0200 by phpDocumentor 1.4.3