PHP 클래스 AppserverIo\Appserver\PersistenceContainer\StatefulSessionBeanMap

상속: extends AppserverIo\Storage\GenericStackable, implements AppserverIo\Collections\MapInterface
파일 보기 프로젝트 열기: appserver-io/appserver

보호된 프로퍼티들

프로퍼티 타입 설명
$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