mirror of
https://github.com/openclassify/openclassify.git
synced 2026-01-11 18:01:10 -06:00
35 lines
679 B
PHP
35 lines
679 B
PHP
<?php namespace Visiosoft\ProfileModule\Adress\Command;
|
|
|
|
|
|
use Visiosoft\ProfileModule\Adress\Contract\AdressRepositoryInterface;
|
|
|
|
class GetAddress
|
|
{
|
|
|
|
/**
|
|
* @var $id
|
|
*/
|
|
protected $id;
|
|
|
|
/**
|
|
* GetProduct constructor.
|
|
* @param $id
|
|
*/
|
|
public function __construct($id)
|
|
{
|
|
$this->id = $id;
|
|
}
|
|
|
|
/**
|
|
* @param AdressRepositoryInterface $adressRepository
|
|
* @return \Anomaly\Streams\Platform\Model\EloquentModel|null
|
|
*/
|
|
public function handle(AdressRepositoryInterface $adressRepository)
|
|
{
|
|
if ($this->id) {
|
|
return $adressRepository->find($this->id);
|
|
}
|
|
return null;
|
|
}
|
|
}
|