| @@ 88-95 (lines=8) @@ | ||
| 85 | * |
|
| 86 | * @return $this |
|
| 87 | */ |
|
| 88 | public function collection($data, $transformer = null, $resourceName = null) |
|
| 89 | { |
|
| 90 | if (! is_null($resourceName)) { |
|
| 91 | $this->resourceName = $resourceName; |
|
| 92 | } |
|
| 93 | ||
| 94 | return $this->data('collection', $data, $transformer); |
|
| 95 | } |
|
| 96 | ||
| 97 | /** |
|
| 98 | * Set the item data that must be transformed. |
|
| @@ 106-113 (lines=8) @@ | ||
| 103 | * |
|
| 104 | * @return $this |
|
| 105 | */ |
|
| 106 | public function item($data, $transformer = null, $resourceName = null) |
|
| 107 | { |
|
| 108 | if (! is_null($resourceName)) { |
|
| 109 | $this->resourceName = $resourceName; |
|
| 110 | } |
|
| 111 | ||
| 112 | return $this->data('item', $data, $transformer); |
|
| 113 | } |
|
| 114 | ||
| 115 | /** |
|
| 116 | * Set the primitive data that must be transformed. |
|
| @@ 124-131 (lines=8) @@ | ||
| 121 | * |
|
| 122 | * @return $this |
|
| 123 | */ |
|
| 124 | public function primitive($data, $transformer = null, $resourceName = null) |
|
| 125 | { |
|
| 126 | if (! is_null($resourceName)) { |
|
| 127 | $this->resourceName = $resourceName; |
|
| 128 | } |
|
| 129 | ||
| 130 | return $this->data('primitive', $data, $transformer); |
|
| 131 | } |
|
| 132 | ||
| 133 | /** |
|
| 134 | * Set the data that must be transformed. |
|