ILIAS  Release_4_2_x_branch Revision 61807
 All Data Structures Namespaces Files Functions Variables Groups Pages
ilECSServerSettings Class Reference

Collection of ECS settings. More...

+ Collaboration diagram for ilECSServerSettings:

Public Member Functions

 activeServerExists ()
 Check if there is any active server.
 serverExists ()
 Check if there is any server.
 getServers ()
 Get servers.
 readInactiveServers ()
 Read inactive servers ilDB $ilDB.

Static Public Member Functions

static getInstance ()
 Get singleton instance.

Protected Member Functions

 __construct ()
 Singleton contructor.

Private Member Functions

 readActiveServers ()
 Read all actice servers ilDB $ilDB.

Private Attributes

 $servers = array()

Static Private Attributes

static $instance = null

Detailed Description

Collection of ECS settings.

Author
Stefan Meyer smeye.nosp@m.r.il.nosp@m.ias@g.nosp@m.mx.d.nosp@m.e
Version
$Id$

Definition at line 34 of file class.ilECSServerSettings.php.

Constructor & Destructor Documentation

ilECSServerSettings::__construct ( )
protected

Singleton contructor.

Definition at line 44 of file class.ilECSServerSettings.php.

References readActiveServers().

{
}

+ Here is the call graph for this function:

Member Function Documentation

ilECSServerSettings::activeServerExists ( )

Check if there is any active server.

Returns
bool

Definition at line 67 of file class.ilECSServerSettings.php.

References getServers().

{
return count($this->getServers()) ? true : false;
}

+ Here is the call graph for this function:

ilECSServerSettings::getServers ( )

Get servers.

Returns
array ilECSSetting

Definition at line 85 of file class.ilECSServerSettings.php.

References $servers.

Referenced by activeServerExists(), ilECSServerTableGUI\parse(), and serverExists().

{
return (array) $this->servers;
}

+ Here is the caller graph for this function:

ilECSServerSettings::readActiveServers ( )
private

Read all actice servers ilDB $ilDB.

Definition at line 113 of file class.ilECSServerSettings.php.

References $ilDB, $query, $res, $row, DB_FETCHMODE_OBJECT, and ilECSSetting\getInstanceByServerId().

Referenced by __construct().

{
global $ilDB;
$query = 'SELECT server_id FROM ecs_server '.
'WHERE active = '.$ilDB->quote(1,'integer').' '.
'ORDER BY title ';
$res = $ilDB->query($query);
$this->servers = array();
while($row = $res->fetchRow(DB_FETCHMODE_OBJECT))
{
$this->servers[$row->server_id] = ilECSSetting::getInstanceByServerId($row->server_id);
}
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilECSServerSettings::readInactiveServers ( )

Read inactive servers ilDB $ilDB.

Definition at line 94 of file class.ilECSServerSettings.php.

References $ilDB, $query, $res, $row, DB_FETCHMODE_OBJECT, and ilECSSetting\getInstanceByServerId().

{
global $ilDB;
$query = 'SELECT server_id FROM ecs_server '.
'WHERE active = '.$ilDB->quote(0,'integer').' '.
'ORDER BY title ';
$res = $ilDB->query($query);
while($row = $res->fetchRow(DB_FETCHMODE_OBJECT))
{
$this->servers[$row->server_id] = ilECSSetting::getInstanceByServerId($row->server_id);
}
}

+ Here is the call graph for this function:

ilECSServerSettings::serverExists ( )

Check if there is any server.

Returns
bool

Definition at line 76 of file class.ilECSServerSettings.php.

References getServers().

{
return count($this->getServers()) ? true : false;
}

+ Here is the call graph for this function:

Field Documentation

ilECSServerSettings::$instance = null
staticprivate

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

Referenced by getInstance().

ilECSServerSettings::$servers = array()
private

Definition at line 38 of file class.ilECSServerSettings.php.

Referenced by getServers().


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