ILIAS  release_5-3 Revision v5.3.23-19-g915713cf615
ilTermsOfServiceDataGatewayFactory Class Reference
+ Collaboration diagram for ilTermsOfServiceDataGatewayFactory:

Public Member Functions

 setDatabaseAdapter (ilDBInterface $db)
 
 getDatabaseAdapter ()
 
 getByName ($name)
 

Protected Attributes

 $db
 

Detailed Description

Author
Michael Jansen mjans.nosp@m.en@d.nosp@m.ataba.nosp@m.y.de
Version
$Id$

Definition at line 8 of file class.ilTermsOfServiceDataGatewayFactory.php.

Member Function Documentation

◆ getByName()

ilTermsOfServiceDataGatewayFactory::getByName (   $name)
Parameters
string$name
Returns
ilTermsOfServiceAcceptanceDatabaseGateway
Exceptions
InvalidArgumentException
ilTermsOfServiceMissingDatabaseAdapterException

Definition at line 37 of file class.ilTermsOfServiceDataGatewayFactory.php.

References $name.

38  {
39  if (null == $this->db) {
40  require_once 'Services/TermsOfService/exceptions/class.ilTermsOfServiceMissingDatabaseAdapterException.php';
41  throw new ilTermsOfServiceMissingDatabaseAdapterException('Incomplete factory configuration. Please inject a database adapter.');
42  }
43 
44  switch (strtolower($name)) {
45  case 'iltermsofserviceacceptancedatabasegateway':
46  require_once 'Services/TermsOfService/classes/class.ilTermsOfServiceAcceptanceDatabaseGateway.php';
47  return new ilTermsOfServiceAcceptanceDatabaseGateway($this->db);
48 
49  default:
50  throw new InvalidArgumentException('Data gateway not supported');
51  }
52  }
if($format !==null) $name
Definition: metadata.php:146

◆ getDatabaseAdapter()

ilTermsOfServiceDataGatewayFactory::getDatabaseAdapter ( )

◆ setDatabaseAdapter()

ilTermsOfServiceDataGatewayFactory::setDatabaseAdapter ( ilDBInterface  $db)
Parameters
ilDBInterface$db

Definition at line 18 of file class.ilTermsOfServiceDataGatewayFactory.php.

References $db.

Field Documentation

◆ $db

ilTermsOfServiceDataGatewayFactory::$db
protected

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