seregazhuk\PinterestBot\Api\Response::fill PHP Method

fill() public method

public fill ( $data )
    public function fill($data)
    {
        $this->data = $data;
        $this->lastError = $this->getValueByKey('resource_response.error', $this->data);
        $this->clientInfo = $this->getValueByKey('client_context', $this->data);
    }

Usage Example

コード例 #1
0
 /** @test */
 public function it_should_return_data_and_bookmarks_from_response_with_pagination()
 {
     $dataWithBookmarks = ['resource' => ['options' => ['bookmarks' => ['my_bookmarks_string']]], 'resource_response' => ['data' => 'some data']];
     $response = new Response();
     $response->fill($dataWithBookmarks);
     $expected = ['data' => 'some data', 'bookmarks' => ['my_bookmarks_string']];
     $this->assertEquals($expected, $response->getPaginationData());
 }
All Usage Examples Of seregazhuk\PinterestBot\Api\Response::fill