PHP Class AppserverIo\Appserver\PersistenceContainer\StatefulSessionBeanMap

Inheritance: extends AppserverIo\Storage\GenericStackable, implements AppserverIo\Collections\MapInterface
Afficher le fichier Open project: appserver-io/appserver

Protected Properties

Свойство Type Description
$items AppserverIo\Storage\GenericStackable The items the map contains.
$lifetime AppserverIo\Storage\GenericStackable Array containing the lifetime of the items.

Méthodes publiques

Méthode Description
__construct ( ) Initializes the map.
add ( mixed $key, mixed $object, integer $lifetime ) : null This method adds the passed object with the passed key to the instance.
addAll ( array $array ) : AppserverIo\Collections\CollectionInterface This method appends all elements of the passed array to the Collection.
clear ( ) : void This method initializes the Collection and removes all exsiting entries.
exists ( mixed $key ) : boolean This method checks if the element with the passed key exists in the Collection.
get ( mixed $key ) : mixed This method returns the element with the passed key from the Collection.
getLifetime ( ) : array Returns the lifetime of the items the instance contains.
isEmpty ( ) : boolean This returns true if the Collection has no entries, otherwise false.
remove ( mixed $key, callable $beforeRemove = null ) : void This method removes the element with the passed key, that has to be an integer, from the IndexedCollection.
size ( ) : integer This method returns the number of entries of the Collection.
toArray ( ) : array This method returns an array with the items of the Dictionary.
toIndexedArray ( ) : array This method returns the internal array with the keys and the related values.

Méthodes protégées

Méthode Description
isTimedOut ( mixed $key ) : boolean Returns TRUE if an lifetime value for the passed key is available and the item has timed out.

Method Details

__construct() public méthode

Initializes the map.
public __construct ( )

add() public méthode

This method adds the passed object with the passed key to the instance.
public add ( mixed $key, mixed $object, integer $lifetime ) : null
$key mixed The key to add the passed value under
$object mixed The object to add to the instance
$lifetime integer The items lifetime
Résultat null

addAll() public méthode

This method appends all elements of the passed array to the Collection.
public addAll ( array $array ) : AppserverIo\Collections\CollectionInterface
$array array Holds the array with the values to add
Résultat AppserverIo\Collections\CollectionInterface The instance

clear() public méthode

This method initializes the Collection and removes all exsiting entries.
public clear ( ) : void
Résultat void

exists() public méthode

This method checks if the element with the passed key exists in the Collection.
public exists ( mixed $key ) : boolean
$key mixed Holds the key to check the elements of the Collection for
Résultat boolean Returns true if an element with the passed key exists in the Collection

get() public méthode

This method returns the element with the passed key from the Collection.
public get ( mixed $key ) : mixed
$key mixed Holds the key of the element to return
Résultat mixed The requested element

getLifetime() public méthode

Returns the lifetime of the items the instance contains.
public getLifetime ( ) : array
Résultat array The array with the items and their lifetime

isEmpty() public méthode

This returns true if the Collection has no entries, otherwise false.
public isEmpty ( ) : boolean
Résultat boolean

isTimedOut() protected méthode

Returns TRUE if an lifetime value for the passed key is available and the item has timed out.
protected isTimedOut ( mixed $key ) : boolean
$key mixed The key of the item the lifetime check is requested
Résultat boolean TRUE if the item has timed out, else FALSE

remove() public méthode

This method removes the element with the passed key, that has to be an integer, from the IndexedCollection.
public remove ( mixed $key, callable $beforeRemove = null ) : void
$key mixed Holds the key of the element to remove
$beforeRemove callable Is called before the item will be removed
Résultat void

size() public méthode

This method returns the number of entries of the Collection.
public size ( ) : integer
Résultat integer The number of entries

toArray() public méthode

The keys are lost in the array.
public toArray ( ) : array
Résultat array Holds an array with the items of the Dictionary

toIndexedArray() public méthode

This method returns the internal array with the keys and the related values.
See also: AppserverIo\Collections\Map::toIndexedArray()
public toIndexedArray ( ) : array
Résultat array Holds the array with keys and values

Property Details

$items protected_oe property

The items the map contains.
protected GenericStackable,AppserverIo\Storage $items
Résultat AppserverIo\Storage\GenericStackable

$lifetime protected_oe property

Array containing the lifetime of the items.
protected GenericStackable,AppserverIo\Storage $lifetime
Résultat AppserverIo\Storage\GenericStackable