MongoDB session save handler Options

package Default
inherited_from \Zend\Stdlib\AbstractOptions

 Methods

Constructor

__construct(array|\Traversable|null $options = null
inherited_from \Zend\Stdlib\AbstractOptions::__construct()

Parameters

$options

Constructor

__construct(array|\Traversable|null $options = null
Inherited

Parameters

$options

array\Traversablenull

Get a configuration property

__get(string $key) : mixed
Inherited
see
inherited_from \Zend\Stdlib\ParameterObjectInterface::__get()

Parameters

$key

string

Exceptions

\Zend\Stdlib\Exception\BadMethodCallException

Returns

mixed

Test if a configuration property is null

__isset(string $key) : boolean
Inherited
see
inherited_from \Zend\Stdlib\ParameterObjectInterface::__isset()

Parameters

$key

string

Returns

boolean

Override AbstractOptions::__set

__set(string $key, mixed $value) 

Validates value if save options are being set.

inherited_from \Zend\Stdlib\AbstractOptions::__set()

Parameters

$key

string

$value

mixed

Set a configuration property

__set(string $key, mixed $value) : void
Inherited
see
inherited_from \Zend\Stdlib\ParameterObjectInterface::__set()

Parameters

$key

string

$value

mixed

Exceptions

\Zend\Stdlib\Exception\BadMethodCallException

Set a configuration property to NULL

__unset(string $key) : void
Inherited
see
inherited_from \Zend\Stdlib\ParameterObjectInterface::__unset()

Parameters

$key

string

Exceptions

\Zend\Stdlib\Exception\InvalidArgumentException

Get collection name

getCollection() : string

Returns

string

Get data field

getDataField() : string

Returns

string

Get database name

getDatabase() : string

Returns

string

Get lifetime Field

getLifetimeField() : string

Returns

string

Get modified Field

getModifiedField() : string

Returns

string

Get name field

getNameField() : string

Returns

string

Get save options

getSaveOptions() : string

Returns

string

Set collection name

setCollection(string $collection) : \Zend\Session\SaveHandler\MongoDBOptions

Parameters

$collection

string

Exceptions

\Zend\Session\Exception\InvalidArgumentException

Returns

\Zend\Session\SaveHandler\MongoDBOptions

Set data field

setDataField(string $dataField) : \Zend\Session\SaveHandler\MongoDBOptions

Parameters

$dataField

string

Exceptions

\Zend\Session\Exception\InvalidArgumentException

Returns

\Zend\Session\SaveHandler\MongoDBOptions

Set database name

setDatabase(string $database) : \Zend\Session\SaveHandler\MongoDBOptions

Parameters

$database

string

Exceptions

\Zend\Session\Exception\InvalidArgumentException

Returns

\Zend\Session\SaveHandler\MongoDBOptions

Set one or more configuration properties

setFromArray(array|\Traversable|\Zend\Stdlib\AbstractOptions $options) : \Zend\Stdlib\AbstractOptions
Inherited

Parameters

$options

array\Traversable\Zend\Stdlib\AbstractOptions

Exceptions

\Zend\Stdlib\Exception\InvalidArgumentException

Returns

\Zend\Stdlib\AbstractOptionsProvides fluent interface

Set lifetime field

setLifetimeField(string $lifetimeField) : \Zend\Session\SaveHandler\MongoDBOptions

Parameters

$lifetimeField

string

Exceptions

\Zend\Session\Exception\InvalidArgumentException

Returns

\Zend\Session\SaveHandler\MongoDBOptions

Set Modified Field

setModifiedField(string $modifiedField) : \Zend\Session\SaveHandler\MongoDBOptions

Parameters

$modifiedField

string

Exceptions

\Zend\Session\Exception\InvalidArgumentException

Returns

\Zend\Session\SaveHandler\MongoDBOptions

Set name field

setNameField(string $nameField) : \Zend\Session\SaveHandler\MongoDBOptions

Parameters

$nameField

string

Exceptions

\Zend\Session\Exception\InvalidArgumentException

Returns

\Zend\Session\SaveHandler\MongoDBOptions

Set save options

setSaveOptions(array $saveOptions) : \Zend\Session\SaveHandler\MongoDBOptions
see

Parameters

$saveOptions

array

Returns

\Zend\Session\SaveHandler\MongoDBOptions

Cast to array

toArray() : array
Inherited

Returns

array

 Properties

 

We use the __ prefix to avoid collisions with properties in user-implementations.

$__strictMode__ : boolean

Default

true
 

Collection name

$collection : string

Default

 

Data field

$dataField : string

Default

'data'
 

Database name

$database : string

Default

 

Lifetime field

$lifetimeField : string

Default

'lifetime'
 

Modified field

$modifiedField : string

Default

'modified'
 

Name field

$nameField : string

Default

'name'
 

Save options

$saveOptions : string

Default

array('w' => 1)
see