I've been trying to find out if this is possible for a while now, but it is starting to get more pressing... Basically, I am trying to create a method that contains an optional parameter...
Here is the definition in question:
Code: Select all
/**
* Completely delete an activity
*
* @param int $ActivityID
* @param int $DeleteFuture
* @return int
*/
function deleteActivity ( $ActivityID, $DeleteFuture=false ) {
$ACTIVITY = new MG_activity($_SESSION['database']);
return $ACTIVITY->deleteActivity($ActivityID, $_SESSION['OrganisationID'], $DeleteFuture);
}
$server->register(
'deleteActivity',
array(
'ActivityID'=>'xsd:int'
, 'DeleteFuture'=>'xsd:int'
),
array('return'=>'xsd:int'),
$NAMESPACE,
$NAMESPACE.'#deleteActivity',
'rpc',
'encoded',
"
This will completely remove data held on the activity of the ID passed to this method.
Returns true on success.
"
);
I know this can be done when defining complexTypes by changing the compositor param to "sequence" or "choice" but have not seen anything anywhere about optional parameters to functions.
Any points please, as I'm hoping I've just missed something??