blob: 8cf841b78bf4d00e3b79c07f2de93f60e4967180 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
|
<?php
namespace OpenCloud\Common\Resource;
use Psr\Http\Message\ResponseInterface;
/**
* Represents an API resource.
*
* @package OpenCloud\Common\Resource
*/
interface ResourceInterface
{
/**
* All models which represent an API resource should be able to be populated
* from a {@see ResponseInterface} object.
*
* @param ResponseInterface $response
*
* @return self
*/
public function populateFromResponse(ResponseInterface $response);
/**
* @param array $data
* @return mixed
*/
public function populateFromArray(array $data);
}
|