bakaphp /
phalcon-api
| 1 | <?php |
||
|
0 ignored issues
–
show
Coding Style
introduced
by
Loading history...
|
|||
| 2 | declare(strict_types=1); |
||
| 3 | |||
| 4 | namespace Gewaer\Models; |
||
| 5 | |||
| 6 | class Users extends \Baka\Auth\Models\Users |
||
| 7 | {
|
||
| 8 | /** |
||
| 9 | * Initialize method for model. |
||
| 10 | */ |
||
| 11 | public function initialize() |
||
| 12 | {
|
||
| 13 | parent::initialize(); |
||
| 14 | |||
| 15 | $this->setSource('users');
|
||
| 16 | } |
||
| 17 | |||
| 18 | /** |
||
| 19 | * Returns table name mapped in the model. |
||
| 20 | * |
||
| 21 | * @return string |
||
| 22 | */ |
||
| 23 | public function getSource(): string |
||
| 24 | {
|
||
| 25 | return 'users'; |
||
| 26 | } |
||
| 27 | |||
| 28 | /** |
||
| 29 | * Get the User key for redis |
||
| 30 | * |
||
| 31 | * @return string |
||
| 32 | */ |
||
| 33 | public function getKey(): string |
||
| 34 | {
|
||
| 35 | return $this->id; |
||
| 36 | } |
||
| 37 | } |
||
| 38 |