mirror of
https://github.com/openclassify/openclassify.git
synced 2026-01-11 18:01:10 -06:00
34 lines
654 B
PHP
34 lines
654 B
PHP
<?php namespace Visiosoft\ProfileModule\Profile\Command;
|
|
|
|
use Visiosoft\ProfileModule\Profile\Contract\ProfileRepositoryInterface;
|
|
|
|
class FindUserProfile
|
|
{
|
|
|
|
/**
|
|
* @var $id
|
|
*/
|
|
protected $id;
|
|
|
|
/**
|
|
* GetProduct constructor.
|
|
* @param $id
|
|
*/
|
|
public function __construct($id)
|
|
{
|
|
$this->id = $id;
|
|
}
|
|
|
|
/**
|
|
* @param ProfileRepositoryInterface $profileRepository
|
|
* @return |null
|
|
*/
|
|
public function handle(ProfileRepositoryInterface $profileRepository)
|
|
{
|
|
if ($this->id) {
|
|
return $profileRepository->findByUserID($this->id);
|
|
}
|
|
return null;
|
|
}
|
|
}
|