ILIAS  Release_5_0_x_branch Revision 61816
 All Data Structures Namespaces Files Functions Variables Groups Pages
ilOpenIdProvider Class Reference

OpenId provider More...

+ Collaboration diagram for ilOpenIdProvider:

Public Member Functions

 __construct ($a_provider_id=0)
 Constructor.
 setId ($a_id)
 Set id.
 getId ()
 Get id.
 enable ($a_status)
 Set en/disabled.
 isEnabled ()
 Check if provider is en/disabled.
 setName ($a_name)
 Set name.
 getName ()
 Get name.
 setURL ($a_url)
 Set URL.
 getURL ()
 Get URL.
 delete ()
 Delete provider.
 add ()
 Add openid provider.
 update ()
 Update provider.

Protected Member Functions

 read ()
 Read provider data.

Private Attributes

 $provider_id = 0
 $name = ''
 $url = 'http://'
 $enabled = true
 $image = 0

Detailed Description

OpenId provider

Author
Stefan Meyer meyer.nosp@m.@lei.nosp@m.fos.c.nosp@m.om
Version
$Id$

Definition at line 11 of file class.ilOpenIdProvider.php.

Constructor & Destructor Documentation

ilOpenIdProvider::__construct (   $a_provider_id = 0)

Constructor.

Definition at line 22 of file class.ilOpenIdProvider.php.

References read(), and setId().

{
if($a_provider_id)
{
$this->setId($a_provider_id);
$this->read();
}
}

+ Here is the call graph for this function:

Member Function Documentation

ilOpenIdProvider::add ( )

Add openid provider.

Returns

Definition at line 125 of file class.ilOpenIdProvider.php.

References $ilDB, $query, getId(), getName(), getURL(), isEnabled(), and setId().

{
global $ilDB;
$this->setId($ilDB->nextId('openid_provider'));
$query = "INSERT INTO openid_provider ".
"(provider_id, enabled, name, url) ".
"VALUES ( ".
$ilDB->quote($this->getId(),'integer').', '.
$ilDB->quote($this->isEnabled(),'integer').', '.
$ilDB->quote($this->getName(),'text').', '.
$ilDB->quote($this->getURL(),'text').
')';
$ilDB->query($query);
return true;
}

+ Here is the call graph for this function:

ilOpenIdProvider::delete ( )

Delete provider.

Returns

Definition at line 111 of file class.ilOpenIdProvider.php.

References $ilDB, $query, and getId().

{
global $ilDB;
$query = "DELETE FROM openid_provider ".
"WHERE provider_id = ".$ilDB->quote($this->getId(),'integer');
$ilDB->query($query);
return true;
}

+ Here is the call graph for this function:

ilOpenIdProvider::enable (   $a_status)

Set en/disabled.

Parameters
bool$a_status
Returns

Definition at line 55 of file class.ilOpenIdProvider.php.

Referenced by read().

{
$this->enabled = (bool) $a_status;
}

+ Here is the caller graph for this function:

ilOpenIdProvider::getId ( )

Get id.

Returns

Definition at line 45 of file class.ilOpenIdProvider.php.

References $provider_id.

Referenced by add(), delete(), read(), and update().

{
}

+ Here is the caller graph for this function:

ilOpenIdProvider::getName ( )

Get name.

Returns

Definition at line 83 of file class.ilOpenIdProvider.php.

References $name.

Referenced by add(), and update().

{
return $this->name;
}

+ Here is the caller graph for this function:

ilOpenIdProvider::getURL ( )

Get URL.

Returns

Definition at line 102 of file class.ilOpenIdProvider.php.

References $url.

Referenced by add(), and update().

{
return $this->url;
}

+ Here is the caller graph for this function:

ilOpenIdProvider::isEnabled ( )

Check if provider is en/disabled.

Returns

Definition at line 64 of file class.ilOpenIdProvider.php.

References $enabled.

Referenced by add(), and update().

{
return (bool) $this->enabled;
}

+ Here is the caller graph for this function:

ilOpenIdProvider::read ( )
protected

Read provider data.

Returns

Definition at line 164 of file class.ilOpenIdProvider.php.

References $ilDB, $query, $res, $row, DB_FETCHMODE_ASSOC, enable(), getId(), setName(), and setURL().

Referenced by __construct().

{
global $ilDB;
$query = "SELECT * FROM openid_provider ".
"WHERE provider_id = ".$ilDB->quote($this->getId(),'integer');
$res = $ilDB->query($query);
while($row = $res->fetchRow(DB_FETCHMODE_ASSOC))
{
$this->setName($row['name']);
$this->enable($row['enabled']);
$this->setURL($row['url']);
return true;
}
return false;
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilOpenIdProvider::setId (   $a_id)

Set id.

Parameters
int$a_id
Returns

Definition at line 36 of file class.ilOpenIdProvider.php.

Referenced by __construct(), and add().

{
$this->provider_id = $a_id;
}

+ Here is the caller graph for this function:

ilOpenIdProvider::setName (   $a_name)

Set name.

Parameters
string$a_name
Returns

Definition at line 74 of file class.ilOpenIdProvider.php.

Referenced by read().

{
$this->name = $a_name;
}

+ Here is the caller graph for this function:

ilOpenIdProvider::setURL (   $a_url)

Set URL.

Parameters
string$a_url
Returns

Definition at line 93 of file class.ilOpenIdProvider.php.

Referenced by read().

{
$this->url = $a_url;
}

+ Here is the caller graph for this function:

ilOpenIdProvider::update ( )

Update provider.

Returns

Definition at line 146 of file class.ilOpenIdProvider.php.

References $ilDB, $query, getId(), getName(), getURL(), and isEnabled().

{
global $ilDB;
$query = 'UPDATE openid_provider SET '.
"enabled = ".$ilDB->quote($this->isEnabled(),'integer').', '.
"name = ".$ilDB->quote($this->getName(),'text').', '.
"url = ".$ilDB->quote($this->getURL(),'text')." ".
"WHERE provider_id = ".$ilDB->quote($this->getId(),'integer');
$ilDB->query($query);
return true;
}

+ Here is the call graph for this function:

Field Documentation

ilOpenIdProvider::$enabled = true
private

Definition at line 16 of file class.ilOpenIdProvider.php.

Referenced by isEnabled().

ilOpenIdProvider::$image = 0
private

Definition at line 17 of file class.ilOpenIdProvider.php.

ilOpenIdProvider::$name = ''
private

Definition at line 14 of file class.ilOpenIdProvider.php.

Referenced by getName().

ilOpenIdProvider::$provider_id = 0
private

Definition at line 13 of file class.ilOpenIdProvider.php.

Referenced by getId().

ilOpenIdProvider::$url = 'http://'
private

Definition at line 15 of file class.ilOpenIdProvider.php.

Referenced by getURL().


The documentation for this class was generated from the following file: