/var/www/vhosts/nabawater/vendor/yiisoft/yii2/web
NameSizeModeActions
migrations/-0755rm
Application.php58360644editdlrm
AssetBundle.php86020644editdlrm
AssetConverter.php45990644editdlrm
AssetConverterInterface.php6980644editdlrm
AssetManager.php255860644editdlrm
BadRequestHttpException.php10770644editdlrm
CacheSession.php36730644editdlrm
CompositeUrlRule.php44820644editdlrm
ConflictHttpException.php8140644editdlrm
Controller.php97390644editdlrm
Cookie.php20020644editdlrm
CookieCollection.php80940644editdlrm
DbSession.php76280644editdlrm
ErrorAction.php60920644editdlrm
ErrorHandler.php191410644editdlrm
ForbiddenHttpException.php11260644editdlrm
GoneHttpException.php10730644editdlrm
GroupUrlRule.php46960644editdlrm
HeaderCollection.php72360644editdlrm
HeadersAlreadySentException.php7000644editdlrm
HtmlResponseFormatter.php10920644editdlrm
HttpException.php17600644editdlrm
IdentityInterface.php36610644editdlrm
JqueryAsset.php4590644editdlrm
JsExpression.php12530644editdlrm
JsonParser.php17310644editdlrm
JsonResponseFormatter.php46770644editdlrm
Link.php20780644editdlrm
Linkable.php11090644editdlrm
MethodNotAllowedHttpException.php8330644editdlrm
MultiFieldSession.php46140644editdlrm
MultipartFormDataParser.php122710644editdlrm
NotAcceptableHttpException.php10630644editdlrm
NotFoundHttpException.php8080644editdlrm
RangeNotSatisfiableHttpException.php12120644editdlrm
Request.php656150644editdlrm
RequestParserInterface.php6690644editdlrm
Response.php413540644editdlrm
ResponseFormatterInterface.php5430644editdlrm
ServerErrorHttpException.php8270644editdlrm
Session.php345780644editdlrm
SessionIterator.php19780644editdlrm
TooManyRequestsHttpException.php10190644editdlrm
UnauthorizedHttpException.php11530644editdlrm
UnprocessableEntityHttpException.php11200644editdlrm
UnsupportedMediaTypeHttpException.php10940644editdlrm
UploadedFile.php88360644editdlrm
UrlManager.php258720644editdlrm
UrlNormalizer.php51030644editdlrm
UrlNormalizerRedirectException.php17580644editdlrm
UrlRule.php217070644editdlrm
UrlRuleInterface.php12230644editdlrm
User.php331100644editdlrm
UserEvent.php12290644editdlrm
View.php237450644editdlrm
ViewAction.php47180644editdlrm
XmlResponseFormatter.php56670644editdlrm
YiiAsset.php5040644editdlrm
Edit: /var/www/vhosts/nabawater/vendor/yiisoft/yii2/web/MultiFieldSession.php (4614B)
* @since 2.0.6 */ abstract class MultiFieldSession extends Session { /** * @var callable 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: * * ```php * function ($fields) { * return [ * 'expireDate' => Yii::$app->formatter->asDate($fields['expire']), * ]; * } * ``` */ public $readCallback; /** * @var callable a callback that will be called during session data writing. * The signature of the callback should be as follows: * * ``` * function ($session) * ``` * * where `$session` is this session instance, this variable can be used to retrieve session data. * Callback should return the actual fields set, which should be saved into the session storage. * * For example: * * ```php * function ($session) { * return [ * 'user_id' => Yii::$app->user->id, * 'ip' => $_SERVER['REMOTE_ADDR'], * 'is_trusted' => $session->get('is_trusted', false), * ]; * } * ``` */ public $writeCallback; /** * Returns a value indicating whether to use custom session storage. * This method overrides the parent implementation and always returns true. * @return bool whether to use custom storage. */ public function getUseCustomStorage() { return true; } /** * Composes storage field set for session writing. * @param string $id session id * @param string $data session data * @return array storage fields */ protected function composeFields($id, $data) { $fields = [ 'data' => $data, ]; if ($this->writeCallback !== null) { $fields = array_merge( $fields, call_user_func($this->writeCallback, $this) ); if (!is_string($fields['data'])) { $_SESSION = $fields['data']; $fields['data'] = session_encode(); } } // ensure 'id' and 'expire' are never affected by [[writeCallback]] $fields = array_merge($fields, [ 'id' => $id, 'expire' => time() + $this->getTimeout(), ]); return $fields; } /** * Extracts session data from storage field set. * @param array $fields storage fields. * @return string session data. */ protected function extractData($fields) { if ($this->readCallback !== null) { if (!isset($fields['data'])) { $fields['data'] = ''; } $extraData = call_user_func($this->readCallback, $fields); if (!empty($extraData)) { session_decode($fields['data']); $_SESSION = array_merge((array) $_SESSION, (array) $extraData); return session_encode(); } return $fields['data']; } return isset($fields['data']) ? $fields['data'] : ''; } }