示例#1
0
 /**
  * Retrieve user logins in JSon format
  *
  * @return string
  */
 protected function getSwarmUsers()
 {
     $swarmApi = new swarmApi();
     $swarmUsers = json_decode($swarmApi->getUsers());
     $users = array();
     foreach ($swarmUsers as $user) {
         // If we want to display the customer's login and fullname in the autocompletion results,
         // use the following type of code
         // $users[] = array( 'label' => $user->user, 'fullname' => 'test' );
         $users[] = $user->user;
     }
     return json_encode($users, JSON_HEX_APOS);
 }