File: /home/assibfaf/public_html/prox-classes/Presenter/Profile/ProfilePresenter.php
<?php
/**
* @package Proxim
* @author Davison Pro <davis@davisonpro.dev | https://davisonpro.dev>
* @copyright 2020 Proxim
* @version 1.0
* @since File available since Release 1.0
*/
namespace Proxim\Presenter\Profile;
use Exception;
use Proxim\Presenter\PresenterInterface;
use Proxim\User\Customer;
class ProfilePresenter implements PresenterInterface
{
/**
* @param Customer $customer
*
* @return ProfileLazyArray
*
* @throws Exception
*/
public function present($customer)
{
if (!($customer instanceof Customer)) {
throw new Exception('ProfilePresenter can only present instance of Customer');
}
return new ProfileLazyArray($customer);
}
}