itstructure /
yii2-rbac-module
| 1 | <?php |
||
| 2 | |||
| 3 | namespace Itstructure\RbacModule\interfaces; |
||
| 4 | |||
| 5 | use yii\rbac\ManagerInterface; |
||
| 6 | |||
| 7 | /** |
||
| 8 | * Interface ModelInterface |
||
| 9 | * |
||
| 10 | * @package Itstructure\RbacModule\interfaces |
||
| 11 | */ |
||
| 12 | interface ModelInterface |
||
| 13 | { |
||
| 14 | /** |
||
| 15 | * Save data. |
||
| 16 | * |
||
| 17 | * @return bool |
||
| 18 | */ |
||
| 19 | public function save(); |
||
| 20 | |||
| 21 | /** |
||
| 22 | * Returns current model id. |
||
| 23 | * |
||
| 24 | * @return int|string |
||
| 25 | */ |
||
| 26 | public function getId(); |
||
| 27 | |||
| 28 | /** |
||
| 29 | * Load data. |
||
| 30 | * Used from the parent model yii\base\Model. |
||
| 31 | * |
||
| 32 | * @param $data |
||
| 33 | * @param null $formName |
||
|
0 ignored issues
–
show
Documentation
Bug
introduced
by
Loading history...
|
|||
| 34 | * |
||
| 35 | * @return bool |
||
| 36 | */ |
||
| 37 | public function load($data, $formName = null); |
||
| 38 | |||
| 39 | /** |
||
| 40 | * Set auth manager. |
||
| 41 | * |
||
| 42 | * @param ManagerInterface $authManager |
||
| 43 | */ |
||
| 44 | public function setAuthManager(ManagerInterface $authManager); |
||
| 45 | |||
| 46 | /** |
||
| 47 | * Get auth manager. |
||
| 48 | * |
||
| 49 | * @return ManagerInterface |
||
| 50 | */ |
||
| 51 | public function getAuthManager(): ManagerInterface; |
||
| 52 | |||
| 53 | /** |
||
| 54 | * Sets the attribute values in a massive way. |
||
| 55 | * Used from the parent model yii\base\Model. |
||
| 56 | * |
||
| 57 | * @param array $values attribute values (name => value) to be assigned to the model. |
||
| 58 | * @param bool $safeOnly whether the assignments should only be done to the safe attributes. |
||
| 59 | */ |
||
| 60 | public function setAttributes($values, $safeOnly = true); |
||
| 61 | } |
||
| 62 |