Created
June 8, 2016 20:53
-
-
Save Mulkave/e9dbcbd7061389fa282db5e73e8853ed to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace Directory\Domains\Citizen\Jobs; | |
use Directory\Foundation\AbstractJob; | |
use Directory\Data\Repositories\CitizenRepository; | |
class RegisterCitizenJob extends AbstractJob | |
{ | |
private $name; | |
private $email; | |
private $occupation; | |
private $ssn; | |
private $address; | |
public function __construct($name, $email, $occupation, $ssn, $address) | |
{ | |
$this->ssn = $ssn; | |
$this->name = $name; | |
$this->email = $email; | |
$this->address = $address; | |
$this->occupation = $occupation; | |
} | |
public function handle(CitizenRepository $citizens) | |
{ | |
return $citizens->register( | |
$this->name, | |
$this->email, | |
$this->ssn, | |
$this->occupation, | |
$this->address | |
); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment