Open Semantic Framework PHP API  3.0
 All Data Structures Namespaces Files Functions Variables Pages
AuthRegistrarUserQuery Class Reference

Auth Registrar User Query to a OSF Auth Registrar User web service endpoint. More...

Inheritance diagram for AuthRegistrarUserQuery:

Public Member Functions

 __construct ($network, $appID, $apiKey, $userID)
 Constructor. More...
 
 user ($uri)
 Sepcifies the user URI. More...
 
 group ($uri)
 Sepcifies the group URI where to register/unregister the user. More...
 
 joinGroup ()
 Specify that we want the user to join that group. More...
 
 leaveGroup ()
 Specify that we want the user to leave the group. More...
 

Detailed Description

Auth Registrar User Query to a OSF Auth Registrar User web service endpoint.

The Auth Registrar: User Web service is used to register a user to an existing Group. This means that the user will have access to all the datasets accessible to that group of users.

Here is a code example of how this class can be used by developers:

use \StructuredDynamics\osf\framework\Namespaces;
use \StructuredDynamics\osf\php\api\ws\auth\registrar\ws\AuthRegistrarUserQuery;
// Register a new web service endpoint to the OSF instance
$arg = new AuthRegistrarUserQuery("http://localhost/ws/");
// Specify the user URI
$arg->user("http://localhost/wsf/users/bob");
// Specify the group where to register the user
$arg->group("http://localhost/wsf/groups/foo");
// Specify that we want the user to join the group
$arg->joinGroup();
// Send the query
$arg->send();
if($arws->isSuccessful())
{
// ...
}
else
{
echo "Web service registration failed: ".$arg->getStatus()." (".$arg->getStatusMessage().")\n";
echo $arg->getStatusMessageDescription();
}
See also
http://wiki.opensemanticframework.org/index.php/Auth_Registrar:_Group
Author
Frederick Giasson, Structured Dynamics LLC.

Definition at line 57 of file AuthRegistrarUserQuery.php.

Constructor & Destructor Documentation

__construct (   $network,
  $appID,
  $apiKey,
  $userID 
)

Constructor.

Parameters
mixed$networkOSF network where to send this query. Ex: http://localhost/ws/
mixed$appIDThe Application ID of the instance instance to key. The APP-ID is related to the API-KEY
mixed$apiKeyThe API Key of the OSF web service endpoints
mixed$userIDThe ID of the user that is doing the query

Definition at line 67 of file AuthRegistrarUserQuery.php.

Member Function Documentation

group (   $uri)

Sepcifies the group URI where to register/unregister the user.

Required: This function must be called before sending the query

Parameters
mixed$uriURI of the group where to register/unregister the user
See also
http://wiki.opensemanticframework.org/index.php/Auth_Registrar:_User#Web_Service_Endpoint_Information
Author
Frederick Giasson, Structured Dynamics LLC.

Definition at line 122 of file AuthRegistrarUserQuery.php.

joinGroup ( )

Specify that we want the user to join that group.

Required: This function must be called before sending the query

See also
http://wiki.opensemanticframework.org/index.php/Auth_Registrar:_User#Web_Service_Endpoint_Information
Author
Frederick Giasson, Structured Dynamics LLC.

Definition at line 138 of file AuthRegistrarUserQuery.php.

leaveGroup ( )

Specify that we want the user to leave the group.

Required: This function must be called before sending the query

See also
http://wiki.opensemanticframework.org/index.php/Auth_Registrar:_User#Web_Service_Endpoint_Information
Author
Frederick Giasson, Structured Dynamics LLC.

Definition at line 154 of file AuthRegistrarUserQuery.php.

user (   $uri)

Sepcifies the user URI.

Required: This function must be called before sending the query

Parameters
mixed$uriURI of the target user
See also
http://wiki.opensemanticframework.org/index.php/Auth_Registrar:_User#Web_Service_Endpoint_Information
Author
Frederick Giasson, Structured Dynamics LLC.

Definition at line 104 of file AuthRegistrarUserQuery.php.