141 return 'url=`'.$this->getURL().
'\', table=`
'.$this->getTable().'\
'';
162 function PGTStorageDB($cas_parent,$user,$password,$database_type,$hostname,$port,$database,$table)
176 $this->_url = $database_type.
':'.
'//'.$user.
':'.$password.
'@'.$hostname.
':'.$port.
'/'.$database;
202 if (!class_exists(
'DB')) {
203 include_once(
'DB.php');
207 $this->_link = DB::connect($this->
getURL());
208 if ( DB::isError($this->_link) ) {
209 phpCAS::error(
'could not connect to database ('.DB::errorMessage($this->_link).
')');
211 var_dump($this->_link);
$_url
a string representing a PEAR DB URL to connect to the database.
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.
PGTStorageDB($cas_parent, $user, $password, $database_type, $hostname, $port, $database, $table)
The class constructor, called by CASClient::SetPGTStorageDB().
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
init()
This method is used to initialize the storage.
const CAS_PGT_STORAGE_DB_DEFAULT_DATABASE
default database when storing PGT's to database
getLink()
This method returns the handle of the connection to the database where PGT's are stored.
PGTStorage($cas_parent)
The constructor of the class, should be called only by inherited classes.
$_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...
error($msg)
This method is used by interface methods to print an error and where the function was originally call...
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
getTable()
This method returns the name of the table where PGT's are stored.
const CAS_PGT_STORAGE_DB_DEFAULT_PORT
default port when storing PGT's to database
getStorageType()
This method returns an informational string giving the type of storage used by the object (used for d...
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