1 | <?php |
||
15 | abstract class PrefixedModel extends Model |
||
16 | { |
||
17 | /* ----------------------------------------------------------------- |
||
18 | | Properties |
||
19 | | ----------------------------------------------------------------- |
||
20 | */ |
||
21 | |||
22 | /** |
||
23 | * The table prefix. |
||
24 | * |
||
25 | * @var string|null |
||
26 | */ |
||
27 | protected $prefix; |
||
28 | |||
29 | /* ----------------------------------------------------------------- |
||
30 | | Getters & Setters |
||
31 | | ----------------------------------------------------------------- |
||
32 | */ |
||
33 | |||
34 | /** |
||
35 | * Get the table associated with the model. |
||
36 | * |
||
37 | * @return string |
||
38 | */ |
||
39 | 12 | public function getTable() |
|
43 | |||
44 | /** |
||
45 | * Get the prefix table associated with the model. |
||
46 | * |
||
47 | * @return null|string |
||
48 | */ |
||
49 | 12 | public function getPrefix() |
|
53 | |||
54 | /** |
||
55 | * Set the prefix table associated with the model. |
||
56 | * |
||
57 | * @param string $prefix |
||
58 | * |
||
59 | * @return self |
||
60 | */ |
||
61 | 6 | public function setPrefix($prefix) |
|
67 | |||
68 | /* ----------------------------------------------------------------- |
||
69 | | Check Methods |
||
70 | | ----------------------------------------------------------------- |
||
71 | */ |
||
72 | |||
73 | /** |
||
74 | * Check if table is prefixed. |
||
75 | * |
||
76 | * @return bool |
||
77 | */ |
||
78 | 12 | public function isPrefixed() |
|
82 | } |
||
83 |