public function create(array $input) { $Employee = new Employee(); $input = array_merge($input, ['role' => 'employee']); if ($UserGateway = UserGateway::create($input)) { $Employee->data = $UserGateway; return $Employee; } return null; }
public function create(array $input) { $Manager = new Manager(); $input = array_merge($input, ['role' => 'manager']); if ($UserGateway = UserGateway::create($input)) { $Manager->data = $UserGateway; return $Manager; } return null; }
public function load($user_id = false) { if ($user_id) { if ($UserGateway = UserGateway::find($user_id)) { $this->data = $UserGateway; return true; } } $this->data = null; return false; }