ILIAS  release_5-1 Revision 5.0.0-5477-g43f3e3fab5
HTMLPurifier_StringHash Class Reference

This is in almost every respect equivalent to an array except that it keeps track of which keys were accessed. More...

+ Inheritance diagram for HTMLPurifier_StringHash:
+ Collaboration diagram for HTMLPurifier_StringHash:

Public Member Functions

 offsetGet ($index)
 Retrieves a value, and logs the access. More...
 
 getAccessed ()
 Returns a lookup array of all array indexes that have been accessed. More...
 
 resetAccessed ()
 Resets the access array. More...
 

Protected Attributes

 $accessed = array()
 array More...
 

Detailed Description

This is in almost every respect equivalent to an array except that it keeps track of which keys were accessed.

Warning
For the sake of backwards compatibility with early versions of PHP 5, you must not use the $hash[$key] syntax; if you do our version of offsetGet is never called.

Definition at line 11 of file StringHash.php.

Member Function Documentation

◆ getAccessed()

HTMLPurifier_StringHash::getAccessed ( )

Returns a lookup array of all array indexes that have been accessed.

Returns
array in form array($index => true).

Definition at line 33 of file StringHash.php.

References $accessed.

34  {
35  return $this->accessed;
36  }

◆ offsetGet()

HTMLPurifier_StringHash::offsetGet (   $index)

Retrieves a value, and logs the access.

Parameters
mixed$index
Returns
mixed

Definition at line 23 of file StringHash.php.

24  {
25  $this->accessed[$index] = true;
26  return parent::offsetGet($index);
27  }

◆ resetAccessed()

HTMLPurifier_StringHash::resetAccessed ( )

Resets the access array.

Definition at line 41 of file StringHash.php.

42  {
43  $this->accessed = array();
44  }

Field Documentation

◆ $accessed

HTMLPurifier_StringHash::$accessed = array()
protected

array

Definition at line 16 of file StringHash.php.

Referenced by getAccessed().


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