RestRequest::hasNamedParameters()


Definition

Checks if there exist named parameters in the current request.
Named parameters are URL parameters sent by the client with the pattern <key>=<value>.

Bool hasNamedParameters ( )

Returns

Example

$Request = new RestRequest();
 
// Called endpoint is: [PUT] https://www.domain.com/webservice/accounting/booking?debug=true
// Content is:         "id:5,account:1234,name:Mr. Smith,amount:592.30"
 
$Application = $Request->getApplication(); // "accounting"
$Method      = $Request->getMethod();      // "booking"
 
if ( $Request->hasNamedParameters() ) // true
{
   [...]
}