コード例 #1
0
 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;
 }
コード例 #2
0
 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;
 }
コード例 #3
0
 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;
 }