Dingo\Api\Http\Response::setMeta PHP Метод

setMeta() публичный Метод

Set the meta data for the response.
public setMeta ( array $meta ) : Response
$meta array
Результат Response
    public function setMeta(array $meta)
    {
        $this->binding->setMeta($meta);
        return $this;
    }

Usage Example

Пример #1
0
 public function testAddingAndSettingMetaCallsUnderlyingTransformerBinding()
 {
     $binding = new Binding(m::mock('Illuminate\\Container\\Container'), 'foo');
     $response = new Response('test', 200, [], $binding);
     $response->setMeta(['foo' => 'bar']);
     $response->meta('bing', 'bang');
     $this->assertEquals(['foo' => 'bar', 'bing' => 'bang'], $response->getMeta());
 }