ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
ILIAS\COPage\Usage\UsageDBRepository Class Reference
+ Collaboration diagram for ILIAS\COPage\Usage\UsageDBRepository:

Public Member Functions

 __construct (\ilDBInterface $db)
 
 deleteHistoryUsagesLowerEqualThan (string $pc_type, string $a_type, int $a_id, int $a_usage_hist_nr, string $a_lang="-")
 

Protected Attributes

ilDBInterface $db
 

Detailed Description

Author
Alexander Killing killi.nosp@m.ng@l.nosp@m.eifos.nosp@m..de

Definition at line 26 of file class.UsageDBRepository.php.

Constructor & Destructor Documentation

◆ __construct()

ILIAS\COPage\Usage\UsageDBRepository::__construct ( \ilDBInterface  $db)

Definition at line 30 of file class.UsageDBRepository.php.

31 {
32 $this->db = $db;
33 }

References ILIAS\COPage\Usage\UsageDBRepository\$db.

Member Function Documentation

◆ deleteHistoryUsagesLowerEqualThan()

ILIAS\COPage\Usage\UsageDBRepository::deleteHistoryUsagesLowerEqualThan ( string  $pc_type,
string  $a_type,
int  $a_id,
int  $a_usage_hist_nr,
string  $a_lang = "-" 
)

Definition at line 35 of file class.UsageDBRepository.php.

41 : void {
42 $db = $this->db;
43
44 $and_hist = " AND usage_hist_nr > 0 AND usage_hist_nr <= " . $db->quote($a_usage_hist_nr, "integer");
45
46 $q = "DELETE FROM page_pc_usage WHERE usage_type = " .
47 $db->quote($a_type, "text") .
48 " AND usage_id = " . $db->quote((int) $a_id, "integer") .
49 " AND usage_lang = " . $db->quote($a_lang, "text") .
50 $and_hist .
51 " AND pc_type = " . $db->quote($pc_type, "text");
53 }
quote($value, string $type)
manipulate(string $query)
Run a (write) Query on the database.
$q
Definition: shib_logout.php:23

Field Documentation

◆ $db

ilDBInterface ILIAS\COPage\Usage\UsageDBRepository::$db
protected

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