HTMLPurifier_StringHash::offsetGet PHP Method

offsetGet() public method

Retrieves a value, and logs the access.
public offsetGet ( mixed $index ) : mixed
$index mixed
return mixed
    public function offsetGet($index)
    {
        $this->accessed[$index] = true;
        return parent::offsetGet($index);
    }

Usage Example

Exemplo n.º 1
0
 function testUsed()
 {
     $hash = new HTMLPurifier_StringHash(array('key' => 'value', 'key2' => 'value2'));
     $this->assertIdentical($hash->getAccessed(), array());
     $t = $hash->offsetGet('key');
     $this->assertIdentical($hash->getAccessed(), array('key' => true));
     $hash->resetAccessed();
     $this->assertIdentical($hash->getAccessed(), array());
 }
All Usage Examples Of HTMLPurifier_StringHash::offsetGet