ILIAS  release_4-3 Revision
 All Data Structures Namespaces Files Functions Variables Groups Pages
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.
 getAccessed ()
 Returns a lookup array of all array indexes that have been accessed.
 resetAccessed ()
 Resets the access array.

Protected Attributes

 $accessed = array()

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

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 27 of file StringHash.php.

References $accessed.

{
}
HTMLPurifier_StringHash::offsetGet (   $index)

Retrieves a value, and logs the access.

Definition at line 18 of file StringHash.php.

{
$this->accessed[$index] = true;
return parent::offsetGet($index);
}
HTMLPurifier_StringHash::resetAccessed ( )

Resets the access array.

Definition at line 34 of file StringHash.php.

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

Field Documentation

HTMLPurifier_StringHash::$accessed = array()
protected

Definition at line 13 of file StringHash.php.

Referenced by getAccessed().


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