xref: /plugin/struct/meta/PageColumn.php (revision 0561158f2815d6f30d3c4038684e6b6918bbfd86)
1*0561158fSAndreas Gohr<?php
2*0561158fSAndreas Gohr
3*0561158fSAndreas Gohrnamespace plugin\struct\meta;
4*0561158fSAndreas Gohr
5*0561158fSAndreas Gohruse plugin\struct\types\AbstractBaseType;
6*0561158fSAndreas Gohr
7*0561158fSAndreas Gohr/**
8*0561158fSAndreas Gohr * Class PageColumn
9*0561158fSAndreas Gohr *
10*0561158fSAndreas Gohr * Just like a column, but does not reference one of the col* data columns but the pid column.
11*0561158fSAndreas Gohr *
12*0561158fSAndreas Gohr * @package plugin\struct\meta
13*0561158fSAndreas Gohr */
14*0561158fSAndreas Gohrclass PageColumn extends Column {
15*0561158fSAndreas Gohr
16*0561158fSAndreas Gohr    /**
17*0561158fSAndreas Gohr     * PageColumn constructor.
18*0561158fSAndreas Gohr     *
19*0561158fSAndreas Gohr     * @param int $sort
20*0561158fSAndreas Gohr     * @param AbstractBaseType $type This should be Page or Title
21*0561158fSAndreas Gohr     * @param string $table
22*0561158fSAndreas Gohr     */
23*0561158fSAndreas Gohr    public function __construct($sort, AbstractBaseType $type, $table='') {
24*0561158fSAndreas Gohr        parent::__construct($sort, $type, 0, true, $table);
25*0561158fSAndreas Gohr    }
26*0561158fSAndreas Gohr
27*0561158fSAndreas Gohr    public function getColref() {
28*0561158fSAndreas Gohr        throw new StructException('Accessing the colref of a PageColumn makes no sense');
29*0561158fSAndreas Gohr    }
30*0561158fSAndreas Gohr
31*0561158fSAndreas Gohr}
32