16 private $newLinks = [];
17 private $existingLinks;
21 foreach ( $links as $link ) {
22 $this->newLinks[$link] =
true;
27 return 'externallinks';
35 return [
'el_to_domain_index',
'el_to_path' ];
44 private function getExistingLinks() {
45 if ( $this->existingLinks ===
null ) {
46 $this->existingLinks = [];
49 $this->existingLinks[$link] =
true;
52 return $this->existingLinks;
56 foreach ( $this->newLinks as $link => $unused ) {
62 foreach ( $this->getExistingLinks() as $link => $unused ) {
68 return \array_key_exists( $linkId, $this->getExistingLinks() );
72 return \array_key_exists( $linkId, $this->newLinks );
78 'el_to_domain_index' => substr( $index[0], 0, 255 ),
79 'el_to_path' => $index[1],
88 'el_to_domain_index' => substr( $index[0], 0, 255 ),
89 'el_to_path' => $index[1]
102 if ( is_array( $ids ) ) {
105 return iterator_to_array( $ids );