PHP Trait AppserverIo\Appserver\Core\Traits\ThreadedContextTrait

Show file Open project: appserver-io/appserver

Public Methods

Method Description
getAllKeys ( ) : array Returns the keys of the bound attributes.
getAttribute ( string $key ) : mixed Returns the value with the passed name from the context.
getAttributes ( ) : array All values registered in the context.
getSerial ( ) : string Returns the serial of the instance.
hasAttribute ( string $key ) : boolean Queries whether the attribute already exists or not.
maskKey ( string $key ) : string Creates a unique identifier to append attributes to the internal property table.
removeAttribute ( string $key ) : void Removes the attribue from the application.
setAttribute ( string $key, mixed $value ) : void Sets the passed key/value pair in the directory.
unmaskKey ( string $key ) : string Umasks the unique key.

Method Details

getAllKeys() public method

Returns the keys of the bound attributes.
public getAllKeys ( ) : array
return array The keys of the bound attributes

getAttribute() public method

Returns the value with the passed name from the context.
See also: AppserverIo\Psr\Context\ContextInterface::getAttribute()
public getAttribute ( string $key ) : mixed
$key string The key of the value to return from the context.
return mixed The requested attribute

getAttributes() public method

All values registered in the context.
public getAttributes ( ) : array
return array The context data

getSerial() public method

Returns the serial of the instance.
public getSerial ( ) : string
return string The serial

hasAttribute() public method

Queries whether the attribute already exists or not.
public hasAttribute ( string $key ) : boolean
$key string The attribute to query for
return boolean TRUE if the attribute already exists, else FALSE

maskKey() public method

Creates a unique identifier to append attributes to the internal property table.
public maskKey ( string $key ) : string
$key string The key used to create a unique identifier
return string The unique identifier

removeAttribute() public method

Removes the attribue from the application.
public removeAttribute ( string $key ) : void
$key string The attribute to remove
return void

setAttribute() public method

Sets the passed key/value pair in the directory.
public setAttribute ( string $key, mixed $value ) : void
$key string The attributes key
$value mixed Tha attribute to be bound
return void

unmaskKey() public method

Umasks the unique key.
public unmaskKey ( string $key ) : string
$key string The unique key to unmask
return string The unmasked key