src/Resources/ResourceKeyResolver.php 1 location
|
@@ 49-51 (lines=3) @@
|
46 |
|
{ |
47 |
|
$transformable = $this->resolveTransformableItem($data); |
48 |
|
|
49 |
|
if (is_object($transformable) && key_exists(get_class($transformable), $this->bindings)) { |
50 |
|
return $this->bindings[get_class($transformable)]; |
51 |
|
} |
52 |
|
|
53 |
|
if ($transformable instanceof Model) { |
54 |
|
return $this->resolveFromModel($transformable); |
src/Transformers/TransformerResolver.php 1 location
|
@@ 118-120 (lines=3) @@
|
115 |
|
*/ |
116 |
|
protected function resolveTransformer($transformable) |
117 |
|
{ |
118 |
|
if (is_object($transformable) && key_exists(get_class($transformable), $this->bindings)) { |
119 |
|
return $this->bindings[get_class($transformable)]; |
120 |
|
} |
121 |
|
|
122 |
|
if ($transformable instanceof Transformable) { |
123 |
|
return $transformable->transformer(); |