web\MultiFieldSession $readCallback

$readCallback public property

A callback that will be called during session data reading. The signature of the callback should be as follows:

function ($fields)

where $fields is the storage field set for read session and $session is this session instance. If callback returns an array, it will be merged into the session data.

For example:

function ($fields) {
    return [
        'expireDate' => Yii::$app->formatter->asDate($fields['expire']),
    ];
}
public callable $readCallback = null
doc_Yii
2016-10-30 17:15:19
Comments
Leave a Comment

Please login to continue.