diff options
Diffstat (limited to 'server/vendor/php-opencloud/common/src/Common/Resource/ResourceInterface.php')
| -rw-r--r-- | server/vendor/php-opencloud/common/src/Common/Resource/ResourceInterface.php | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/server/vendor/php-opencloud/common/src/Common/Resource/ResourceInterface.php b/server/vendor/php-opencloud/common/src/Common/Resource/ResourceInterface.php new file mode 100644 index 0000000..8cf841b --- /dev/null +++ b/server/vendor/php-opencloud/common/src/Common/Resource/ResourceInterface.php @@ -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); +} |
