src/services/traits/ModelByString.php 1 location
|
@@ 224-237 (lines=14) @@
|
221 |
|
* @param Record $record |
222 |
|
* @return BaseModel|null |
223 |
|
*/ |
224 |
|
protected function findCacheByRecordByString(Record $record) |
225 |
|
{ |
226 |
|
|
227 |
|
$property = $this->recordStringProperty(); |
228 |
|
|
229 |
|
$stringValue = $record->{$property}; |
230 |
|
|
231 |
|
if ($stringValue === null) { |
232 |
|
return null; |
233 |
|
} |
234 |
|
|
235 |
|
return $this->findCacheByString($stringValue); |
236 |
|
|
237 |
|
} |
238 |
|
|
239 |
|
/******************************************* |
240 |
|
* RECORD BY STRING |
src/services/traits/ObjectByString.php 1 location
|
@@ 224-237 (lines=14) @@
|
221 |
|
* @param Record $record |
222 |
|
* @return BaseObject|null |
223 |
|
*/ |
224 |
|
protected function findCacheByRecordByString(Record $record) |
225 |
|
{ |
226 |
|
|
227 |
|
$property = $this->recordStringProperty(); |
228 |
|
|
229 |
|
$stringValue = $record->{$property}; |
230 |
|
|
231 |
|
if ($stringValue === null) { |
232 |
|
return null; |
233 |
|
} |
234 |
|
|
235 |
|
return $this->findCacheByString($stringValue); |
236 |
|
|
237 |
|
} |
238 |
|
|
239 |
|
/******************************************* |
240 |
|
* RECORD BY STRING |