API - XOOPS 2.5.11 Beta 2
By monxoops.fr
Parser Class Reference

Public Member Functions

 __construct ($depth_limit=false, $caller=null)
 
 setCallerClass ($caller=null)
 
 getCallerClass ()
 
 setDepthLimit ($depth_limit=false)
 
 getDepthLimit ()
 
 parseDeep (&$var, BasicObject $o)
 
 parse (&$var, BasicObject $o)
 
 addPlugin (Plugin $p)
 
 clearPlugins ()
 
 haltParse ()
 
 childHasPath (InstanceObject $parent, BasicObject $child)
 
 getCleanArray (array $array)
 

Data Fields

const TRIGGER_NONE = 0
 
const TRIGGER_BEGIN = 1
 
const TRIGGER_SUCCESS = 2
 
const TRIGGER_RECURSION = 4
 
const TRIGGER_DEPTH_LIMIT = 8
 
const TRIGGER_COMPLETE = 14
 

Protected Member Functions

 noRecurseCall ()
 

Protected Attributes

 $caller_class
 
 $depth_limit = false
 
 $marker
 
 $object_hashes = array()
 
 $parse_break = false
 
 $plugins = array()
 

Constructor & Destructor Documentation

◆ __construct()

__construct (   $depth_limit = false,
  $caller = null 
)
Parameters
false | int$depth_limitMaximum depth to parse data
null | string$callerCaller class name

Member Function Documentation

◆ addPlugin()

addPlugin ( Plugin  $p)
Here is the call graph for this function:

◆ childHasPath()

childHasPath ( InstanceObject  $parent,
BasicObject  $child 
)

◆ clearPlugins()

clearPlugins ( )

◆ getCallerClass()

getCallerClass ( )

◆ getCleanArray()

getCleanArray ( array  $array)

Returns an array without the recursion marker in it.

DO NOT pass an array that has had it's marker removed back into the parser, it will result in an extra recursion

Parameters
array$arrayArray potentially containing a recursion marker
Returns
array Array with recursion marker removed

◆ getDepthLimit()

getDepthLimit ( )

◆ haltParse()

haltParse ( )

◆ noRecurseCall()

noRecurseCall ( )
protected
Here is the caller graph for this function:

◆ parse()

parse ( $var,
BasicObject  $o 
)

Parses a variable into a Kint object structure.

Parameters
mixed$varThe input variable
BasicObject$oThe base object
Returns
BasicObject
Here is the caller graph for this function:

◆ parseDeep()

parseDeep ( $var,
BasicObject  $o 
)

Disables the depth limit and parses a variable.

This should not be used unless you know what you're doing!

Parameters
mixed$varThe input variable
BasicObject$oThe base object
Returns
BasicObject
Here is the call graph for this function:

◆ setCallerClass()

setCallerClass (   $caller = null)

Set the caller class.

Parameters
null | string$callerCaller class name
Here is the call graph for this function:

◆ setDepthLimit()

setDepthLimit (   $depth_limit = false)

Set the depth limit.

Parameters
false | int$depth_limitMaximum depth to parse data
Here is the call graph for this function:

Field Documentation

◆ $caller_class

$caller_class
protected

◆ $depth_limit

$depth_limit = false
protected

◆ $marker

$marker
protected

◆ $object_hashes

$object_hashes = array()
protected

◆ $parse_break

$parse_break = false
protected

◆ $plugins

$plugins = array()
protected

◆ TRIGGER_BEGIN

const TRIGGER_BEGIN = 1

◆ TRIGGER_COMPLETE

const TRIGGER_COMPLETE = 14

◆ TRIGGER_DEPTH_LIMIT

const TRIGGER_DEPTH_LIMIT = 8

◆ TRIGGER_NONE

const TRIGGER_NONE = 0

Plugin triggers.

These are constants indicating trigger points for plugins

BEGIN: Before normal parsing SUCCESS: After successful parsing RECURSION: After parsing cancelled by recursion DEPTH_LIMIT: After parsing cancelled by depth limit COMPLETE: SUCCESS | RECURSION | DEPTH_LIMIT

While a plugin's getTriggers may return any of these

◆ TRIGGER_RECURSION

const TRIGGER_RECURSION = 4

◆ TRIGGER_SUCCESS

const TRIGGER_SUCCESS = 2

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