Lines
100.00%
2 / 2
Functions and Methods
100.00%
1 / 1
Classes and Traits
100.00%
1 / 1
| Name | Lines | Functions and Methods | CRAP | Classes and Traits | ||||||
|---|---|---|---|---|---|---|---|---|---|---|
| Config | 100.00% | 2 / 2 | 100.00% | 1 / 1 | 1 | 100.00% | 1 / 1 | |||
| addConditionName | 100.00% | 2 / 2 | 100.00% | 1 / 1 | 1 | |||||
| 1 | <?php | |
| 2 | ||
| 3 | namespace BO\Zmsbackend\Config\Repository; | |
| 4 | ||
| 5 | class Config extends \BO\Zmsbackend\Query\Base | |
| 6 | { | |
| 7 | /** | |
| 8 | * @var String TABLE mysql table reference | |
| 9 | */ | |
| 10 | const string TABLE = 'config'; | |
| 11 | ||
| 12 | const string QUERY_SELECT = ' | |
| 13 | SELECT * FROM config | |
| 14 | '; | |
| 15 | ||
| 16 | const string QUERY_SELECT_PROPERTY = | |
| 17 | 'SELECT | |
| 18 | value | |
| 19 | FROM config | |
| 20 | WHERE name = ? | |
| 21 | '; | |
| 22 | ||
| 23 | const string QUERY_REPLACE_PROPERTY = | |
| 24 | 'REPLACE INTO config | |
| 25 | SET name = :property, | |
| 26 | value = :value | |
| 27 | '; | |
| 28 | ||
| 29 | ||
| 30 | public function addConditionName($itemName): static | |
| 31 | { | |
| 32 | $this->query->where(self::TABLE . '.name', '=', $itemName); | |
| 33 | return $this; | |
| 34 | } | |
| 35 | } |