bristol-su /
control
| 1 | <?php |
||
| 2 | |||
|
0 ignored issues
–
show
Coding Style
introduced
by
Loading history...
|
|||
| 3 | namespace BristolSU\ControlDB\AdditionalProperties; |
||
| 4 | |||
| 5 | /** |
||
| 6 | * Handles additional properties |
||
| 7 | */ |
||
|
0 ignored issues
–
show
|
|||
| 8 | interface ImplementsAdditionalProperties |
||
| 9 | { |
||
| 10 | |||
| 11 | /** |
||
| 12 | * Add an additional property |
||
| 13 | * |
||
| 14 | * @param $key |
||
|
0 ignored issues
–
show
|
|||
| 15 | */ |
||
|
0 ignored issues
–
show
|
|||
| 16 | public static function addProperty(string $key): void; |
||
| 17 | |||
| 18 | /** |
||
| 19 | * Get all additional attributes the model is using |
||
| 20 | * |
||
| 21 | * @return array |
||
| 22 | */ |
||
| 23 | public static function getAdditionalAttributes(): array; |
||
| 24 | |||
| 25 | /** |
||
| 26 | * Retrieve an additional attribute value |
||
| 27 | * |
||
| 28 | * @param string $key Key of the attribute |
||
| 29 | * @return mixed Value of the attribute |
||
|
0 ignored issues
–
show
|
|||
| 30 | */ |
||
| 31 | public function getAdditionalAttribute(string $key); |
||
| 32 | |||
| 33 | /** |
||
| 34 | * Set an additional attribute value |
||
| 35 | * |
||
| 36 | * @param string $key Key of the attribute |
||
|
0 ignored issues
–
show
|
|||
| 37 | * @param mixed $value Value of the attribute |
||
|
0 ignored issues
–
show
|
|||
| 38 | */ |
||
|
0 ignored issues
–
show
|
|||
| 39 | public function setAdditionalAttribute(string $key, $value); |
||
| 40 | |||
| 41 | /** |
||
| 42 | * Save an additional attribute value |
||
| 43 | * |
||
| 44 | * @param string $key Key of the attribute |
||
|
0 ignored issues
–
show
|
|||
| 45 | * @param mixed $value Value of the attribute |
||
|
0 ignored issues
–
show
|
|||
| 46 | */ |
||
|
0 ignored issues
–
show
|
|||
| 47 | public function saveAdditionalAttribute(string $key, $value); |
||
| 48 | |||
| 49 | } |