Stud.IP  2.0 Revision 48548
 All Data Structures Namespaces Files Functions Variables Pages
UserService Class Reference
Inheritance diagram for UserService:
Inheritance graph
Collaboration diagram for UserService:
Collaboration graph

Public Member Functions

 before_filter ($name, &$args)
 create_user_action ($api_key, $user)
 find_user_by_user_name_action ($api_key, $user_name)
 update_user_action ($api_key, $user)
 delete_user_action ($api_key, $user_name)

Member Function Documentation

before_filter (   $name,
$args 
)

This method is called before every other service method and tries to authenticate an incoming request using the first argument as an so called "api key". If the "api key" matches a valid one, the request will be authorized, otherwise a fault is sent back to the caller.

Parameters
stringthe function's name.
arrayan array of arguments that will be delivered to the function.
Returns
mixed if this method returns a "soap_fault" or "FALSE", further processing will be aborted and a "soap_fault" delivered.

Here is the call graph for this function:

create_user_action (   $api_key,
  $user 
)

Create a User using a User struct as defined in the service's WSDL.

Parameters
stringthe api key.
stringa partially filled User struct.
Returns
string the updated User struct. At least the user's id is filled in. If the user cannot be created, a fault containing a textual representation of the error will be delivered instead.
delete_user_action (   $api_key,
  $user_name 
)

Deletes a user.

Parameters
stringthe api key.
stringthe user's username.
Returns
boolean returns TRUE if deletion was successful or a fault otherwise.

Here is the call graph for this function:

find_user_by_user_name_action (   $api_key,
  $user_name 
)

Searches for a user using the user's user name.

Parameters
stringthe api key.
stringthe user's username.
Returns
mixed the found User struct or a fault if the user could not be found.

Here is the call graph for this function:

update_user_action (   $api_key,
  $user 
)

Updates a user.

Parameters
stringthe api key.
arrayan array representation of an user
Returns
mixed the user's User struct or a fault if the user could not be updated.

The documentation for this class was generated from the following file: