1 | <?php |
||
21 | trait UserTrait |
||
22 | { |
||
23 | use PasswordTrait, |
||
24 | RegistrationTrait, |
||
25 | IdentityTrait; |
||
26 | |||
27 | /** |
||
28 | * Create new entity model associated with current user. |
||
29 | * if $config does not specify `userClass` property, self will be assigned to. |
||
30 | * @param string $className Full qualified class name. |
||
31 | * @param array $config name-value pairs that will be used to initialize |
||
32 | * the object properties. |
||
33 | * @param boolean $loadDefault Determines whether loading default values |
||
34 | * after entity model created. |
||
35 | * @param boolean $skipIfSet whether existing value should be preserved. |
||
36 | * This will only set defaults for attributes that are `null`. |
||
37 | * @return $className |
||
|
|||
38 | */ |
||
39 | 18 | public function create($className, $config = [], $loadDefault = true, $skipIfSet = true) |
|
52 | |||
53 | /** |
||
54 | * Find existed or create new model. |
||
55 | * @param string $className |
||
56 | * @param array $condition |
||
57 | * @param array $config |
||
58 | * @return $className |
||
59 | */ |
||
60 | 1 | public function findOneOrCreate($className, $condition = [], $config = null) |
|
75 | |||
76 | /** |
||
77 | * Get all rules with current user properties. |
||
78 | * @return array all rules. |
||
79 | */ |
||
80 | 32 | public function rules() |
|
86 | } |
||
87 |
This check marks PHPDoc comments that could not be parsed by our parser. To see which comment annotations we can parse, please refer to our documentation on supported doc-types.