public function write($pgt, $pgt_iou)
    {
        phpCAS::traceBegin();

        // initialize the PDO object for this method
        $pdo = $this->_getPdo();
        $this->_setErrorMode();

        try {
            $pdo->beginTransaction();

            $query = $pdo->prepare($this->storePgtSql());
            $query->bindValue(':pgt', $pgt, PDO::PARAM_STR);
            $query->bindValue(':pgt_iou', $pgt_iou, PDO::PARAM_STR);
            $query->execute();
            $query->closeCursor();

            $pdo->commit();
        }
        catch(PDOException $e) {
            // attempt rolling back the transaction before throwing a phpCAS error
            try {
                $pdo->rollBack();
            }
            catch(PDOException $e) {
            }
            phpCAS::error('error writing PGT to database: ' . $e->getMessage());
        }

        // reset the PDO object
        $this->_resetErrorMode();

        phpCAS::traceEnd();
    }
public function write($pgt, $pgt_iou)
    {
        phpCAS::traceBegin();

        // initialize the PDO object for this method
        $pdo = $this->_getPdo();
        $this->_setErrorMode();

        try {
            $pdo->beginTransaction();

            $query = $pdo->prepare($this->storePgtSql());
            $query->bindValue(':pgt', $pgt, PDO::PARAM_STR);
            $query->bindValue(':pgt_iou', $pgt_iou, PDO::PARAM_STR);
            $query->execute();
            $query->closeCursor();

            $pdo->commit();
        }
        catch(PDOException $e) {
            // attempt rolling back the transaction before throwing a phpCAS error
            try {
                $pdo->rollBack();
            }
            catch(PDOException $e) {
            }
            phpCAS::error('error writing PGT to database: ' . $e->getMessage());
        }

        // reset the PDO object
        $this->_resetErrorMode();

        phpCAS::traceEnd();
    }
public function write ( $ pgt , $ pgt_iou ) { phpCAS :: traceBegin ( ) ; // initialize the PDO object for this method $ pdo = $ this -> _getPdo ( ) ; $ this -> _setErrorMode ( ) ; try { $ pdo -> beginTransaction ( ) ; $ query = $ pdo -> prepare ( $ this -> storePgtSql ( ) ) ; $ query -> bindValue ( ':pgt' , $ pgt , PDO :: PARAM_STR ) ; $ query -> bindValue ( ':pgt_iou' , $ pgt_iou , PDO :: PARAM_STR ) ; $ query -> execute ( ) ; $ query -> closeCursor ( ) ; $ pdo -> commit ( ) ; } catch ( PDOException $ e ) { // attempt rolling back the transaction before throwing a phpCAS error try { $ pdo -> rollBack ( ) ; } catch ( PDOException $ e ) { } phpCAS :: error ( 'error writing PGT to database: ' . $ e -> getMessage ( ) ) ; } // reset the PDO object $ this -> _resetErrorMode ( ) ; phpCAS :: traceEnd ( ) ; }
This method stores a PGT and its corresponding PGT Iou in the database.
Echoes a warning on error.

@param string $pgt     the PGT
@param string $pgt_iou the PGT iou

@return void
This method stores a PGT and its corresponding PGT Iou in the database . Echoes a warning on error .