Moodle PHP Documentation 4.5
Moodle 4.5dev (Build: 20240606) (d3ae1391abe)
HTMLPurifier_PropertyList Class Reference

Public Member Functions

 __construct ($parent=null)
 
 get ($name)
 Recursively retrieves the value for a key.
 
 getParent ()
 Returns the parent plist.
 
 has ($name)
 Returns true if a given key exists.
 
 reset ($name=null)
 Resets a value to the value of it's parent, usually the default.
 
 set ($name, $value)
 Sets the value of a key, for this plist.
 
 setParent ($plist)
 Sets the parent plist.
 
 squash ($force=false)
 Squashes this property list and all of its property lists into a single array, and returns the array.
 

Protected Attributes

 $cache
 Cache.
 
 $data = array()
 Internal data-structure for properties.
 
 $parent
 Parent plist.
 

Constructor & Destructor Documentation

◆ __construct()

HTMLPurifier_PropertyList::__construct ( $parent = null)
Parameters
HTMLPurifier_PropertyList$parentParent plist

Member Function Documentation

◆ get()

HTMLPurifier_PropertyList::get ( $name)

Recursively retrieves the value for a key.

Parameters
string$name
Exceptions
HTMLPurifier_Exception

◆ getParent()

HTMLPurifier_PropertyList::getParent ( )

Returns the parent plist.

Return values
HTMLPurifier_PropertyList

◆ has()

HTMLPurifier_PropertyList::has ( $name)

Returns true if a given key exists.

Parameters
string$name
Return values
bool

◆ reset()

HTMLPurifier_PropertyList::reset ( $name = null)

Resets a value to the value of it's parent, usually the default.

If no value is specified, the entire plist is reset.

Parameters
string$name

◆ set()

HTMLPurifier_PropertyList::set ( $name,
$value )

Sets the value of a key, for this plist.

Parameters
string$name
mixed$value

◆ setParent()

HTMLPurifier_PropertyList::setParent ( $plist)

Sets the parent plist.

Parameters
HTMLPurifier_PropertyList$plistParent plist

◆ squash()

HTMLPurifier_PropertyList::squash ( $force = false)

Squashes this property list and all of its property lists into a single array, and returns the array.

This value is cached by default.

Parameters
bool$forceIf true, ignores the cache and regenerates the array.
Return values
array

Member Data Documentation

◆ $cache

HTMLPurifier_PropertyList::$cache
protected

Cache.

@type array

◆ $data

HTMLPurifier_PropertyList::$data = array()
protected

Internal data-structure for properties.

@type array

◆ $parent

HTMLPurifier_PropertyList::$parent
protected

Parent plist.

@type HTMLPurifier_PropertyList


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