Swift
[ class tree: Swift ] [ index: Swift ] [ all elements ]

Class: Swift_KeyCache_DiskKeyCache

Source Location: /vendors/swift/classes/Swift/KeyCache/DiskKeyCache.php

Class Overview


A KeyCache which streams to and from disk.


Author(s):

  • Chris Corbyn

Implements interfaces:

Constants

Methods



Class Details

[line 24]
A KeyCache which streams to and from disk.



Tags:

author:  Chris Corbyn
filesource:  Source Code for this file


[ Top ]


Class Methods


constructor __construct [line 67]

Swift_KeyCache_DiskKeyCache __construct( Swift_KeyCache_KeyCacheInputStream $stream, string $path)

Create a new DiskKeyCache with the given $stream for cloning to make InputByteStreams, and the given $path to save to.



Tags:

access:  public


Parameters:

Swift_KeyCache_KeyCacheInputStream   $stream  
string   $path   to save to

[ Top ]

destructor __destruct [line 308]

void __destruct( )

Destructor.



Tags:

access:  public


[ Top ]

method clearAll [line 246]

void clearAll( string $nsKey)

Clear all data in the namespace $nsKey if it exists.



Tags:

access:  public



Implementation of:
Swift_KeyCache::clearAll()
Clear all data in the namespace $nsKey if it exists.

Parameters:

string   $nsKey  

[ Top ]

method clearKey [line 231]

void clearKey( string $nsKey, string $itemKey)

Clear data for $itemKey in the namespace $nsKey if it exists.



Tags:

access:  public



Implementation of:
Swift_KeyCache::clearKey()
Clear data for $itemKey in the namespace $nsKey if it exists.

Parameters:

string   $nsKey  
string   $itemKey  

[ Top ]

method exportToByteStream [line 195]

void exportToByteStream( string $nsKey, string $itemKey, Swift_InputByteStream $is)

Get data back out of the cache as a ByteStream.



Tags:

access:  public



Implementation of:
Swift_KeyCache::exportToByteStream()
Get data back out of the cache as a ByteStream.

Parameters:

string   $nsKey  
string   $itemKey  
Swift_InputByteStream   $is   to write the data to

[ Top ]

method getInputByteStream [line 145]

Swift_InputByteStream getInputByteStream( string $nsKey, string $itemKey, [Swift_InputByteStream $writeThrough = null])

Provides a ByteStream which when written to, writes data to $itemKey.

NOTE: The stream will always write in append mode.




Tags:

access:  public



Implementation of:
Swift_KeyCache::getInputByteStream()
Provides a ByteStream which when written to, writes data to $itemKey.

Parameters:

string   $nsKey  
string   $itemKey  
Swift_InputByteStream   $writeThrough  

[ Top ]

method getString [line 166]

string getString( string $nsKey, string $itemKey)

Get data back out of the cache as a string.



Tags:

throws:  Swift_IoException
access:  public



Implementation of:
Swift_KeyCache::getString()
Get data back out of the cache as a string.

Parameters:

string   $nsKey  
string   $itemKey  

[ Top ]

method hasKey [line 221]

boolean hasKey( string $nsKey, string $itemKey)

Check if the given $itemKey exists in the namespace $nsKey.



Tags:

access:  public



Implementation of:
Swift_KeyCache::hasKey()
Check if the given $itemKey exists in the namespace $nsKey.

Parameters:

string   $nsKey  
string   $itemKey  

[ Top ]

method importFromByteStream [line 113]

void importFromByteStream( string $nsKey, string $itemKey, Swift_OutputByteStream $os, int $mode)

Set a ByteStream into the cache under $itemKey for the namespace $nsKey.



Tags:

see:  MODE_WRITE, MODE_APPEND
throws:  Swift_IoException
access:  public



Implementation of:
Swift_KeyCache::importFromByteStream()
Set a ByteStream into the cache under $itemKey for the namespace $nsKey.

Parameters:

string   $nsKey  
string   $itemKey  
Swift_OutputByteStream   $os  
int   $mode  

[ Top ]

method setString [line 83]

void setString( string $nsKey, string $itemKey, string $string, int $mode)

Set a string into the cache under $itemKey for the namespace $nsKey.



Tags:

see:  MODE_WRITE, MODE_APPEND
throws:  Swift_IoException
access:  public



Implementation of:
Swift_KeyCache::setString()
Set a string into the cache under $itemKey for the namespace $nsKey.

Parameters:

string   $nsKey  
string   $itemKey  
string   $string  
int   $mode  

[ Top ]


Class Constants

POSITION_END =  1

[line 31]

Signal to place pointer at end of file


[ Top ]

POSITION_START =  0

[line 28]

Signal to place pointer at start of file


[ Top ]



Documentation generated on Mon, 05 Sep 2011 20:33:08 -0500 by phpDocumentor 1.4.3