ResponseFormatted.php 605 Bytes
<?php

namespace PgServiceSdk\Kernel\Contracts;

use Psr\Http\Message\ResponseInterface;

/**
 * Class ResponseFormatted
 * @package PgServiceSdk\Kernel\Contacts
 */
abstract class ResponseFormatted
{
    /**
     * @var \Psr\Http\Message\ResponseInterface
     */
    protected $response;

    /**
     * ResponseFormatted constructor.
     * @param ResponseInterface $response
     */
    public function __construct(ResponseInterface $response)
    {
        $this->response = $response;
    }

    /**
     * 格式化资源
     *
     * @return mixed
     */
    public abstract function format();
}