Total Complexity | 5 |
Total Lines | 43 |
Duplicated Lines | 0 % |
Coverage | 100% |
Changes | 2 | ||
Bugs | 1 | Features | 0 |
1 | <?php |
||
7 | class MemoizedUrlRecord extends UrlRecord |
||
8 | { |
||
9 | 56 | public static $cachedRecords; |
|
10 | |||
11 | public static function clearCachedRecords() |
||
14 | } |
||
15 | |||
16 | 75 | /** |
|
17 | * Here we cache all the url records and determine the proper url record |
||
18 | * via the collection methods. This is a lot faster on large data sets. |
||
19 | 75 | * |
|
20 | 75 | * @param Model $model |
|
21 | * @param string|null $locale |
||
22 | * @return UrlRecord |
||
23 | * @throws UrlRecordNotFound |
||
24 | */ |
||
25 | public static function findByModel(Model $model, string $locale = null): UrlRecord |
||
43 | } |
||
44 | |||
45 | public static function getByModel(Model $model) |
||
52 |