ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
ILIAS\MetaData\Copyright\Database\Wrapper Class Reference
+ Inheritance diagram for ILIAS\MetaData\Copyright\Database\Wrapper:
+ Collaboration diagram for ILIAS\MetaData\Copyright\Database\Wrapper:

Public Member Functions

 __construct (\ilDBInterface $db)
 
 nextID (string $table)
 
 query (string $query)
 
 manipulate (string $query)
 
 update (string $table, array $values, array $where)
 
 insert (string $table, array $values)
 
 quoteInteger (int $integer)
 
 nextID (string $table)
 
 query (string $query)
 
 manipulate (string $query)
 
 update (string $table, array $values, array $where)
 
 insert (string $table, array $values)
 
 quoteInteger (int $integer)
 

Protected Attributes

ilDBInterface $db
 

Detailed Description

Definition at line 23 of file Wrapper.php.

Constructor & Destructor Documentation

◆ __construct()

ILIAS\MetaData\Copyright\Database\Wrapper::__construct ( \ilDBInterface  $db)

Definition at line 27 of file Wrapper.php.

28 {
29 $this->db = $db;
30 }

References ILIAS\MetaData\Copyright\Database\Wrapper\$db.

Member Function Documentation

◆ insert()

ILIAS\MetaData\Copyright\Database\Wrapper::insert ( string  $table,
array  $values 
)

Implements ILIAS\MetaData\Copyright\Database\WrapperInterface.

Definition at line 60 of file Wrapper.php.

60 : void
61 {
62 $this->db->insert(
63 $table,
64 $values
65 );
66 }

◆ manipulate()

ILIAS\MetaData\Copyright\Database\Wrapper::manipulate ( string  $query)

Implements ILIAS\MetaData\Copyright\Database\WrapperInterface.

Definition at line 46 of file Wrapper.php.

46 : void
47 {
48 $this->db->manipulate($query);
49 }

◆ nextID()

ILIAS\MetaData\Copyright\Database\Wrapper::nextID ( string  $table)

Implements ILIAS\MetaData\Copyright\Database\WrapperInterface.

Definition at line 32 of file Wrapper.php.

32 : int
33 {
34 return $this->db->nextId($table);
35 }

◆ query()

ILIAS\MetaData\Copyright\Database\Wrapper::query ( string  $query)
Returns
array[]

Implements ILIAS\MetaData\Copyright\Database\WrapperInterface.

Definition at line 37 of file Wrapper.php.

37 : \Generator
38 {
39 $result = $this->db->query($query);
40
41 while ($row = $this->db->fetchAssoc($result)) {
42 yield $row;
43 }
44 }

◆ quoteInteger()

ILIAS\MetaData\Copyright\Database\Wrapper::quoteInteger ( int  $integer)

Implements ILIAS\MetaData\Copyright\Database\WrapperInterface.

Definition at line 68 of file Wrapper.php.

68 : string
69 {
70 return $this->db->quote($integer, \ilDBConstants::T_INTEGER);
71 }

References ilDBConstants\T_INTEGER.

◆ update()

ILIAS\MetaData\Copyright\Database\Wrapper::update ( string  $table,
array  $values,
array  $where 
)

Implements ILIAS\MetaData\Copyright\Database\WrapperInterface.

Definition at line 51 of file Wrapper.php.

51 : void
52 {
53 $this->db->update(
54 $table,
55 $values,
56 $where
57 );
58 }

Field Documentation

◆ $db

ilDBInterface ILIAS\MetaData\Copyright\Database\Wrapper::$db
protected

Definition at line 25 of file Wrapper.php.

Referenced by ILIAS\MetaData\Copyright\Database\Wrapper\__construct().


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