10 if (!class_exists(
'DB')) {
11 include_once(
'DB.php');
119 return 'url=`'.$this->getURL().
'\', table=`
'.$this->getTable().'\
'';
140 function PGTStorageDB($cas_parent,$user,$password,$database_type,$hostname,$port,$database,$table)
154 $this->_url = $database_type.
':'.
'//'.$user.
':'.$password.
'@'.
$server.
':'.$port.
'/'.$database;
179 $this->_link = DB::connect($this->
getURL());
180 if ( DB::isError($this->_link) ) {
181 phpCAS::error(
'could not connect to database ('.DB::errorMessage($this->_link).
')');
183 var_dump($this->_link);
$_url
a string representing a PEAR DB URL to connect to the database.
init()
This method is used to initialize the storage.
The PGTStorageDB class is a class for PGT database storage.
getURL()
This method returns the PEAR DB URL to use to connect to the database.
traceEnd($res='')
This method is used to indicate the end of the execution of a function in debug mode.
$_table
The name of the table where PGT's are stored.
const CAS_PGT_STORAGE_DB_DEFAULT_HOSTNAME
default host when storing PGT's to database
PGTStorageDB($cas_parent, $user, $password, $database_type, $hostname, $port, $database, $table)
The class constructor, called by CASClient::SetPGTStorageDB().
const CAS_PGT_STORAGE_DB_DEFAULT_DATABASE
default database when storing PGT's to database
PGTStorage($cas_parent)
The constructor of the class, should be called only by inherited classes.
getTable()
This method returns the name of the table where PGT's are stored.
getStorageType()
This method returns an informational string giving the type of storage used by the object (used for d...
$_link
The handle of the connection to the database where PGT's are stored.
traceBegin()
This method is used to indicate the start of the execution of a function in debug mode...
getLink()
This method returns the handle of the connection to the database where PGT's are stored.
error($msg)
This method is used by interface methods to print an error and where the function was originally call...
getURL()
This method returns the PEAR DB URL to use to connect to the database.
getStorageInfo()
This method returns an informational string giving informations on the parameters of the storage...
const CAS_PGT_STORAGE_DB_DEFAULT_TABLE
default table when storing PGT's to database
const CAS_PGT_STORAGE_DB_DEFAULT_PORT
default port when storing PGT's to database
isInitialized()
This method tells if the storage has already been intialized.
The PGTStorage class is a generic class for PGT storage.
const CAS_PGT_STORAGE_DB_DEFAULT_DATABASE_TYPE
default database type when storing PGT's to database