mirror of
https://github.com/openclassify/openclassify.git
synced 2026-04-16 12:12:09 -05:00
23 lines
455 B
PHP
23 lines
455 B
PHP
<?php namespace Visiosoft\ProfileModule\Adress\Command;
|
|
|
|
use Visiosoft\ProfileModule\Adress\Contract\AdressRepositoryInterface;
|
|
|
|
class GetAddressByUser
|
|
{
|
|
protected $id;
|
|
|
|
public function __construct($id)
|
|
{
|
|
$this->id = $id;
|
|
}
|
|
|
|
public function handle(AdressRepositoryInterface $addressRepository)
|
|
{
|
|
if ($this->id) {
|
|
return $addressRepository->findByUser($this->id);
|
|
}
|
|
|
|
return null;
|
|
}
|
|
}
|