Class Chain

Summary

Fully Qualified Name: Zend\Authentication\Storage\Chain
Implements: StorageInterface

Description

Methods

Name Description Defined By
__construct() Initializes the priority queue. Chain
add() Chain
clear() Clear all storage in the chain. Chain
isEmpty() Loop over the queue of storage until a storage is found that is non-empty. If such storage is not found, then this chain storage itself is empty. Chain
read() If the chain is non-empty then the storage with the top priority is guaranteed to be filled. Return its value. Chain
write() Write the new $contents to all storage in the chain. Chain

Method Details

__construct()

Initializes the priority queue.

Returns:

add()

Parameter Name Type Description
$storage \StorageInterface
$priority int

Returns:

clear()

Clear all storage in the chain.

Returns:

isEmpty()

Loop over the queue of storage until a storage is found that is non-empty. If such storage is not found, then this chain storage itself is empty.

In case a non-empty storage is found then this chain storage is also non-empty. Report that, but also make sure that all storage with higher priority that are empty are filled.

Returns:

read()

If the chain is non-empty then the storage with the top priority is guaranteed to be filled. Return its value.

Returns:

write()

Write the new $contents to all storage in the chain.

Parameter Name Type Description
$contents

Returns:

Top