1 | <?php |
||
18 | abstract class ModelByIdOrString extends ModelById |
||
19 | { |
||
20 | |||
21 | use traits\ModelByString; |
||
22 | |||
23 | /** |
||
24 | * @inheritdoc |
||
25 | */ |
||
26 | public function find($identifier, string $toScenario = null) |
||
39 | |||
40 | /******************************************* |
||
41 | * CACHE |
||
42 | *******************************************/ |
||
43 | |||
44 | /** |
||
45 | * @inheritdoc |
||
46 | */ |
||
47 | public function findCache($identifier) |
||
60 | |||
61 | /** |
||
62 | * @inheritdoc |
||
63 | */ |
||
64 | public function addToCache(BaseModel $model) |
||
73 | |||
74 | |||
75 | /** |
||
76 | * @inheritdoc |
||
77 | */ |
||
78 | public function findCacheByRecord(Record $record) |
||
87 | |||
88 | /******************************************* |
||
89 | * RECORD |
||
90 | *******************************************/ |
||
91 | |||
92 | /** |
||
93 | * @param BaseModel $model |
||
94 | * @return Record|null |
||
95 | */ |
||
96 | public function findRecordByModel(BaseModel $model) |
||
111 | } |
||
112 |