getAll() public method

Get all user role data.
public getAll ( ) : array
return array
示例#1
0
 public function run()
 {
     $userRoleRepo = new UserRoleRepository();
     // check data
     $ret = $userRoleRepo->getAll();
     if (!empty($ret)) {
         echo "dont need UserRoleTableSeeder\n";
         return;
     }
     // member
     $params = ['name' => 'メンバー'];
     $userRoleRepo->insert($params);
     // owner
     $params = ['name' => 'オーナー'];
     $userRoleRepo->insert($params);
     // removed
     $params = ['name' => '退会済み'];
     $userRoleRepo->insert($params);
 }