Skip to content

Instantly share code, notes, and snippets.

@Mulkave
Created June 8, 2016 20:53
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Mulkave/e9dbcbd7061389fa282db5e73e8853ed to your computer and use it in GitHub Desktop.
Save Mulkave/e9dbcbd7061389fa282db5e73e8853ed to your computer and use it in GitHub Desktop.
<?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