ILIAS  trunk Revision v11.0_alpha-1831-g8615d53dadb
All Data Structures Namespaces Files Functions Variables Enumerations Enumerator Modules Pages
ILIAS\Wiki\Links\MissingPageDBRepository Class Reference

Wiki page repo. More...

+ Collaboration diagram for ILIAS\Wiki\Links\MissingPageDBRepository:

Public Member Functions

 __construct (InternalDataService $data, \ilDBInterface $db)
 
 save (int $wiki_id, int $source_id, string $title, string $lang)
 
 deleteForTarget (int $wiki_id, string $target_title, string $lang="-")
 
 deleteForSourceId (int $wiki_id, int $source_id, string $lang="-")
 
 getSourcesOfMissingTarget (int $wiki_id, string $target_title, string $lang="-")
 

Protected Attributes

InternalDataService $data
 
ilDBInterface $db
 

Detailed Description

Wiki page repo.

Definition at line 28 of file MissingPageDBRepository.php.

Constructor & Destructor Documentation

◆ __construct()

ILIAS\Wiki\Links\MissingPageDBRepository::__construct ( InternalDataService  $data,
\ilDBInterface  $db 
)

Member Function Documentation

◆ deleteForSourceId()

ILIAS\Wiki\Links\MissingPageDBRepository::deleteForSourceId ( int  $wiki_id,
int  $source_id,
string  $lang = "-" 
)

Definition at line 65 of file MissingPageDBRepository.php.

References $lang.

65  : void
66  {
67  $this->db->manipulateF(
68  "DELETE FROM il_wiki_missing_page WHERE " .
69  " wiki_id = %s AND source_id = %s AND lang = %s",
70  array("integer", "integer", "text"),
71  array($wiki_id, $source_id, $lang)
72  );
73  }
$lang
Definition: xapiexit.php:25

◆ deleteForTarget()

ILIAS\Wiki\Links\MissingPageDBRepository::deleteForTarget ( int  $wiki_id,
string  $target_title,
string  $lang = "-" 
)

Definition at line 55 of file MissingPageDBRepository.php.

References $lang, and ilWikiUtil\makeDbTitle().

55  : void
56  {
57  $this->db->manipulateF(
58  "DELETE FROM il_wiki_missing_page WHERE " .
59  " wiki_id = %s AND target_name = %s AND lang = %s",
60  array("integer", "text", "text"),
61  array($wiki_id, \ilWikiUtil::makeDbTitle($target_title), $lang)
62  );
63  }
$lang
Definition: xapiexit.php:25
static makeDbTitle(string $a_par)
+ Here is the call graph for this function:

◆ getSourcesOfMissingTarget()

ILIAS\Wiki\Links\MissingPageDBRepository::getSourcesOfMissingTarget ( int  $wiki_id,
string  $target_title,
string  $lang = "-" 
)
Returns
int[]

Definition at line 78 of file MissingPageDBRepository.php.

References $lang, and ilWikiUtil\makeDbTitle().

78  : \Iterator
79  {
80  $set = $this->db->queryF(
81  "SELECT source_id FROM il_wiki_missing_page WHERE " .
82  " wiki_id = %s AND target_name = %s AND lang = %s",
83  array("integer", "text", "text"),
84  array($wiki_id, \ilWikiUtil::makeDbTitle($target_title), $lang)
85  );
86  while ($rec = $this->db->fetchAssoc($set)) {
87  yield (int) $rec["source_id"];
88  }
89  }
$lang
Definition: xapiexit.php:25
static makeDbTitle(string $a_par)
+ Here is the call graph for this function:

◆ save()

ILIAS\Wiki\Links\MissingPageDBRepository::save ( int  $wiki_id,
int  $source_id,
string  $title,
string  $lang 
)

Definition at line 41 of file MissingPageDBRepository.php.

References ilWikiUtil\makeDbTitle().

41  : void
42  {
43  $this->db->replace(
44  "il_wiki_missing_page",
45  [
46  "wiki_id" => ["integer", $wiki_id],
47  "source_id" => ["integer", $source_id],
48  "target_name" => ["text", \ilWikiUtil::makeDbTitle($title)],
49  "lang" => ["text", $lang]
50  ],
51  []
52  );
53  }
$lang
Definition: xapiexit.php:25
static makeDbTitle(string $a_par)
+ Here is the call graph for this function:

Field Documentation

◆ $data

InternalDataService ILIAS\Wiki\Links\MissingPageDBRepository::$data
protected

◆ $db

ilDBInterface ILIAS\Wiki\Links\MissingPageDBRepository::$db
protected

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