/** * Initializes the Session component. * This method will initialize the {@see \rock\mongodb\Session::$connection} property to make sure it refers to a valid MongoDB connection. * @throws InstanceException if {@see \rock\mongodb\Session::$connection} is invalid. */ public function init() { parent::init(); $this->connection = Instance::ensure($this->connection); }