| 1 | <?php |
||
| 7 | class Column |
||
| 8 | { |
||
| 9 | /** @var Grammar */ |
||
| 10 | protected $grammar; |
||
| 11 | |||
| 12 | /** @var string */ |
||
| 13 | protected $table; |
||
| 14 | |||
| 15 | /** @var string */ |
||
| 16 | protected $name; |
||
| 17 | |||
| 18 | /** @var string */ |
||
| 19 | protected $mapping; |
||
| 20 | |||
| 21 | /** @var int */ |
||
| 22 | protected $weight; |
||
| 23 | |||
| 24 | /** |
||
| 25 | * Create new searchable column instance. |
||
| 26 | * |
||
| 27 | * @param string $table |
||
| 28 | * @param string $name |
||
| 29 | * @param string $mapping |
||
| 30 | * @param int $weight |
||
| 31 | */ |
||
| 32 | public function __construct(Grammar $grammar, $table, $name, $mapping, $weight = 1) |
||
| 40 | |||
| 41 | /** |
||
| 42 | * Get qualified name wrapped by the grammar. |
||
| 43 | * |
||
| 44 | * @return string |
||
| 45 | */ |
||
| 46 | public function getWrapped() |
||
| 50 | |||
| 51 | /** |
||
| 52 | * Get column name with table prefix. |
||
| 53 | * |
||
| 54 | * @return string |
||
| 55 | */ |
||
| 56 | public function getQualifiedName() |
||
| 60 | |||
| 61 | /** |
||
| 62 | * @return string |
||
| 63 | */ |
||
| 64 | public function getTable() |
||
| 68 | |||
| 69 | /** |
||
| 70 | * @return string |
||
| 71 | */ |
||
| 72 | public function getName() |
||
| 76 | |||
| 77 | /** |
||
| 78 | * @return string |
||
| 79 | */ |
||
| 80 | public function getMapping() |
||
| 84 | |||
| 85 | /** |
||
| 86 | * @return int |
||
| 87 | */ |
||
| 88 | public function getWeight() |
||
| 92 | } |
||
| 93 |