PHP Класс AppserverIo\Appserver\PersistenceContainer\StatefulSessionBeanMap

Автор: Tim Wagner ([email protected])
Наследование: extends AppserverIo\Storage\GenericStackable, implements AppserverIo\Collections\MapInterface
Показать файл Открыть проект

Защищенные свойства (Protected)

Свойство Тип Описание
$items AppserverIo\Storage\GenericStackable The items the map contains.
$lifetime AppserverIo\Storage\GenericStackable Array containing the lifetime of the items.

Открытые методы

Метод Описание
__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.

Защищенные методы

Метод Описание
isTimedOut ( mixed $key ) : boolean Returns TRUE if an lifetime value for the passed key is available and the item has timed out.

Описание методов

__construct() публичный метод

Initializes the map.
public __construct ( )

add() публичный метод

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
Результат null

addAll() публичный метод

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
Результат AppserverIo\Collections\CollectionInterface The instance

clear() публичный метод

This method initializes the Collection and removes all exsiting entries.
public clear ( ) : void
Результат void

exists() публичный метод

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
Результат boolean Returns true if an element with the passed key exists in the Collection

get() публичный метод

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
Результат mixed The requested element

getLifetime() публичный метод

Returns the lifetime of the items the instance contains.
public getLifetime ( ) : array
Результат array The array with the items and their lifetime

isEmpty() публичный метод

This returns true if the Collection has no entries, otherwise false.
public isEmpty ( ) : boolean
Результат boolean

isTimedOut() защищенный метод

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
Результат boolean TRUE if the item has timed out, else FALSE

remove() публичный метод

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
Результат void

size() публичный метод

This method returns the number of entries of the Collection.
public size ( ) : integer
Результат integer The number of entries

toArray() публичный метод

The keys are lost in the array.
public toArray ( ) : array
Результат array Holds an array with the items of the Dictionary

toIndexedArray() публичный метод

This method returns the internal array with the keys and the related values.
См. также: AppserverIo\Collections\Map::toIndexedArray()
public toIndexedArray ( ) : array
Результат array Holds the array with keys and values

Описание свойств

$items защищенное свойство

The items the map contains.
protected GenericStackable,AppserverIo\Storage $items
Результат AppserverIo\Storage\GenericStackable

$lifetime защищенное свойство

Array containing the lifetime of the items.
protected GenericStackable,AppserverIo\Storage $lifetime
Результат AppserverIo\Storage\GenericStackable