public function MetadataBag::initialize in Zircon Profile 8
Same name and namespace in other branches
- 8.0 vendor/symfony/http-foundation/Session/Storage/MetadataBag.php \Symfony\Component\HttpFoundation\Session\Storage\MetadataBag::initialize()
Initializes the Bag.
Parameters
array $array:
Overrides SessionBagInterface::initialize
File
- vendor/
symfony/ http-foundation/ Session/ Storage/ MetadataBag.php, line 71
Class
- MetadataBag
- Metadata container.
Namespace
Symfony\Component\HttpFoundation\Session\StorageCode
public function initialize(array &$array) {
$this->meta =& $array;
if (isset($array[self::CREATED])) {
$this->lastUsed = $this->meta[self::UPDATED];
$timeStamp = time();
if ($timeStamp - $array[self::UPDATED] >= $this->updateThreshold) {
$this->meta[self::UPDATED] = $timeStamp;
}
}
else {
$this
->stampCreated();
}
}