public function writeSession($id, $data)
    {
        // exception must be caught in session write handler
        // http://us.php.net/manual/en/function.session-set-save-handler.php#refsect1-function.session-set-save-handler-notes
        try {
            $fields = $this->composeFields($id, $data);
            $fields = $this->typecastFields($fields);
            $this->db->createCommand()->upsert($this->sessionTable, $fields)->execute();
        } catch (\Exception $e) {
            Yii::getApp()->errorHandler->handleException($e);
            return false;
        }

        return true;
    }
public function writeSession($id, $data)
    {
        // exception must be caught in session write handler
        // http://us.php.net/manual/en/function.session-set-save-handler.php#refsect1-function.session-set-save-handler-notes
        try {
            $fields = $this->composeFields($id, $data);
            $fields = $this->typecastFields($fields);
            $this->db->createCommand()->upsert($this->sessionTable, $fields)->execute();
        } catch (\Exception $e) {
            Yii::getApp()->errorHandler->handleException($e);
            return false;
        }

        return true;
    }
public function writeSession ( $ id , $ data ) { // exception must be caught in session write handler // http://us.php.net/manual/en/function.session-set-save-handler.php#refsect1-function.session-set-save-handler-notes try { $ fields = $ this -> composeFields ( $ id , $ data ) ; $ fields = $ this -> typecastFields ( $ fields ) ; $ this -> db -> createCommand ( ) -> upsert ( $ this -> sessionTable , $ fields ) -> execute ( ) ; } catch ( \ Exception $ e ) { Yii :: getApp ( ) -> errorHandler -> handleException ( $ e ) ; return false ; } return true ; }
Session write handler.
@internal Do not call this method directly.
@param string $id session ID
@param string $data session data
@return bool whether session write is successful
Session write handler .