New Library

This commit is contained in:
EoleDev 2016-03-09 15:36:02 +01:00
parent 5c6f6c97b7
commit c479658f0b
83 changed files with 5788 additions and 0 deletions

View 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);
}