*/ class PageTitleCollection extends DirectCollection { /** @inheritdoc */ public function __construct(?AbstractIndex $pageIndex = null) { parent::__construct($pageIndex ?? 'page', 'title'); } /** * Use FileIndex for titles since each page has exactly one title * accessed by RID — no need to load the entire index into memory * * @inheritdoc */ public function getTokenIndex(int $group = 0): AbstractIndex { if ($this->idxToken instanceof AbstractIndex) { return $this->idxToken; } return new FileIndex($this->idxToken, '', $this->isWritable); } }