Total Complexity | 6 |
Total Lines | 58 |
Duplicated Lines | 0 % |
Coverage | 100% |
Changes | 0 |
1 | <?php |
||
10 | class OrmResolver implements ResolverInterface |
||
11 | { |
||
12 | |||
13 | use InstanceConfigTrait; |
||
14 | use LocatorAwareTrait; |
||
15 | |||
16 | /** |
||
17 | * Default configuration. |
||
18 | * - `userModel` The alias for users table, defaults to Users. |
||
19 | * - `finder` The finder method to use to fetch user record. Defaults to 'all'. |
||
20 | * You can set finder name as string or an array where key is finder name and value |
||
21 | * is an array passed to `Table::find()` options. |
||
22 | * E.g. ['finderName' => ['some_finder_option' => 'some_value']] |
||
23 | * |
||
24 | * @var array |
||
25 | */ |
||
26 | protected $_defaultConfig = [ |
||
27 | 'userModel' => 'Users', |
||
28 | 'finder' => 'all', |
||
29 | ]; |
||
30 | |||
31 | /** |
||
32 | * Constructor. |
||
33 | * |
||
34 | * @param array $config Config array. |
||
35 | */ |
||
36 | 25 | public function __construct(array $config = []) |
|
39 | 25 | } |
|
40 | |||
41 | /** |
||
42 | * {@inheritDoc} |
||
43 | */ |
||
44 | 9 | public function find(array $conditions): ?ArrayAccess |
|
70 |