New Library
This commit is contained in:
parent
5c6f6c97b7
commit
c479658f0b
83 changed files with 5788 additions and 0 deletions
29
server/vendor/php-opencloud/common/src/Common/Resource/ResourceInterface.php
vendored
Normal file
29
server/vendor/php-opencloud/common/src/Common/Resource/ResourceInterface.php
vendored
Normal file
|
@ -0,0 +1,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);
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue