Swift_KeyCache_SimpleKeyCacheInputStream::flushBuffers PHP Méthode

flushBuffers() public méthode

Flush the contents of the stream (empty it) and set the internal pointer to the beginning.
public flushBuffers ( )
    public function flushBuffers()
    {
        $this->_keyCache->clearKey($this->_nsKey, $this->_itemKey);
    }

Usage Example

 public function testFlushContentClearsKey()
 {
     $cache = $this->getMock('Swift_KeyCache');
     $cache->expects($this->once())->method('clearKey')->with($this->_nsKey, 'foo');
     $stream = new Swift_KeyCache_SimpleKeyCacheInputStream();
     $stream->setKeyCache($cache);
     $stream->setNsKey($this->_nsKey);
     $stream->setItemKey('foo');
     $stream->flushBuffers();
 }
All Usage Examples Of Swift_KeyCache_SimpleKeyCacheInputStream::flushBuffers