@@ -5345,7 +5345,7 @@ public function getLicense(){
53455345 $ url = $ this ->server_url . "/admin/index.php " ;
53465346 $ postdata = 'op=getlicense ' ;
53475347 $ buffer = $ this ->doPOST ($ url , $ postdata );
5348- $ collection = new Collection ($ buffer , 'license ' , ' LicenseRecord ' );
5348+ $ collection = new Collection ($ buffer , 'license ' , LicenseRecord::class );
53495349 $ this ->stopTimer ();
53505350 if ($ collection ->getNumberOfRecords () > 0 )
53515351 return $ collection ->getRecords ()[0 ];
@@ -5361,7 +5361,7 @@ public function getAdGroups(){
53615361 $ url = $ this ->server_url . "/admin/index.php " ;
53625362 $ postdata = 'op=getadgroups ' ;
53635363 $ buffer = $ this ->doPOST ($ url , $ postdata );
5364- $ collection = new Collection ($ buffer , "entry " , " AdgroupRecord " , "meta " );
5364+ $ collection = new Collection ($ buffer , "entry " , AdgroupRecord::class , "meta " );
53655365 $ this ->stopTimer ();
53665366 if ($ collection ->getNumberOfRecords () > 0 )
53675367 {
@@ -5425,7 +5425,7 @@ public function getGroups(){
54255425 $ url = $ this ->server_url . "/admin/index.php " ;
54265426 $ postdata = 'op=getgroups ' ;
54275427 $ buffer = $ this ->doPOST ($ url , $ postdata );
5428- $ collection = new Collection ($ buffer , "group " , " GroupRecord " , "meta " );
5428+ $ collection = new Collection ($ buffer , "group " , GroupRecord::class , "meta " );
54295429 $ this ->stopTimer ();
54305430 if ($ collection ->getNumberOfRecords () > 0 )
54315431 {
@@ -5440,22 +5440,32 @@ public function getGroups(){
54405440
54415441 //API to get members of Group
54425442 //RETURNS a Member Record
5443- public function getMembersForGroup () {
5443+
5444+ /**
5445+ * Returns members of the group page
5446+ *
5447+ * @param string $groupId Group id
5448+ * @param int $start beginning of the page
5449+ * @param int $end end of tha page
5450+ * @return Collection|null
5451+ */
5452+ public function getMembersForGroup (string $ groupId , int $ start = 0 , int $ end = 10 ) {
54445453 $ this ->startTimer ();
54455454 $ url = $ this ->server_url . "/admin/index.php " ;
5446- $ postdata = 'op=checkadlogin ' ;
5455+ $ postdata = http_build_query ([
5456+ 'op ' => 'getmembersforgroup ' ,
5457+ 'groupid ' => $ groupId ,
5458+ 'start ' => $ start ,
5459+ 'end ' => $ end
5460+ ]);
54475461 $ buffer = $ this ->doPOST ($ url , $ postdata );
54485462 $ collection = new Collection ($ buffer , "member " , MembersRecord::class, "meta " );
54495463 $ this ->stopTimer ();
5450- if ($ collection ->getNumberOfRecords () > 0 )
5451- {
5464+ if ($ collection ->getNumberOfRecords () > 0 ) {
54525465 return $ collection ;
5453- }
5454- else
5455- {
5456- return NULL ;
5457- }
54585466 }
5467+ return NULL ;
5468+ }
54595469
54605470 //API to get admin users
54615471 //RETURNS AdminUsersRecord
@@ -6138,7 +6148,7 @@ public function getRmcClients($username = '', $status = ''){
61386148 $ postdata = 'op=getrmcclients&start=0&end=10 ' ;
61396149 }
61406150 $ buffer = $ this ->doPOST ($ url , $ postdata );
6141- $ collection = new Collection ($ buffer , "rmc_client " , " RMCRecord " , "meta " );
6151+ $ collection = new Collection ($ buffer , "rmc_client " , RMCRecord::class , "meta " );
61426152 $ this ->stopTimer ();
61436153 if ($ collection ->getNumberOfRecords () > 0 )
61446154 {
@@ -6184,7 +6194,7 @@ public function getRmcCommands($clientid){
61846194 $ url = $ this ->server_url . "/admin/index.php " ;
61856195 $ postdata = 'op=getrmccommands&remote_client_id= ' . $ clientid ;
61866196 $ buffer = $ this ->doPOST ($ url , $ postdata );
6187- $ collection = new Collection ($ buffer , "rmc_command " , " RMCCommandRecord " );
6197+ $ collection = new Collection ($ buffer , "rmc_command " , RMCCommandRecord::class );
61886198 $ this ->stopTimer ();
61896199 if ($ collection ->getNumberOfRecords () > 0 )
61906200 {
0 commit comments