xref: /dokuwiki/inc/Search/Collection/PageTitleCollection.php (revision 95b16223691931fa8086866a2b318bc319b06a8f)
1d92c078cSAndreas Gohr<?php
2d92c078cSAndreas Gohr
3d92c078cSAndreas Gohrnamespace dokuwiki\Search\Collection;
4d92c078cSAndreas Gohr
5*95b16223SAndreas Gohruse dokuwiki\Search\Index\AbstractIndex;
6*95b16223SAndreas Gohr
7d92c078cSAndreas Gohr/**
8d92c078cSAndreas Gohr * Collection for page titles
9d92c078cSAndreas Gohr *
10d92c078cSAndreas Gohr * Stores the title of each page as a direct 1:1 mapping.
11d92c078cSAndreas Gohr *
12d92c078cSAndreas Gohr * @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
13d92c078cSAndreas Gohr * @author Andreas Gohr <andi@splitbrain.org>
14d92c078cSAndreas Gohr */
15d92c078cSAndreas Gohrclass PageTitleCollection extends DirectCollection
16d92c078cSAndreas Gohr{
17d92c078cSAndreas Gohr    /** @inheritdoc */
18*95b16223SAndreas Gohr    public function __construct(?AbstractIndex $pageIndex = null)
19d92c078cSAndreas Gohr    {
20*95b16223SAndreas Gohr        parent::__construct($pageIndex ?? 'page', 'title');
21d92c078cSAndreas Gohr    }
22d92c078cSAndreas Gohr}
23