18 private $newLinks = [];
21 private $existingLinks;
36 return [
'iwl_prefix',
'iwl_title' ];
40 foreach ( $this->newLinks as $prefix => $links ) {
41 foreach ( $links as
$title => $unused ) {
42 yield [ (string)$prefix, (
string)
$title ];
53 private function getExistingLinks() {
54 if ( $this->existingLinks ===
null ) {
55 $this->existingLinks = [];
57 $this->existingLinks[$row->iwl_prefix][$row->iwl_title] =
true;
60 return $this->existingLinks;
64 foreach ( $this->getExistingLinks() as $prefix => $links ) {
65 foreach ( $links as
$title => $unused ) {
66 yield [ (string)$prefix, (
string)
$title ];
72 $links = $this->getExistingLinks();
73 [ $prefix,
$title ] = $linkId;
74 return isset( $links[$prefix][
$title] );
78 [ $prefix,
$title ] = $linkId;
79 return isset( $this->newLinks[$prefix][
$title] );
83 [ $prefix,
$title ] = $linkId;
85 'iwl_prefix' => $prefix,
91 [ $prefix,
$title ] = $linkId;
93 'iwl_prefix' => $prefix,