Restler explorer prompt viewer with REQUEST_BODY json

I am trying to comment out my methods correctly so that the Explorer will show the values REQUEST_BODY

for put and push as the values โ€‹โ€‹of my object. Now I only see { "property" : "" }

.

What I want is a json generated string for the object I created for this insert / update:

class Wash_Object extends \stdClass
{
    public $completed_date='';
    public $certificate_id=0;
    public $trailer_id=0;
    ...
}

      

I've been looking through the documentation for both Restler and Explorer, but so far I haven't seen exactly how you tell Explorer to populate that text box in the Value for field REQUEST_BODY

. What comment handles this little trick?

+3


source to share


1 answer


You have to decorate the function with all the parameters that you want to fill in the field. You don't need to use parameters if you are reading from $ request_data.



/**
 * Updates Item
 *
 * @url PUT /
 *
 * @param array $request_data
 * @param string $completed_date
 * @param int $certificate_id
 * @param int $trailer_id
 *
 * @return mixed
 */
public function put($request_data,
                       $completed_date,
                       $certificate_id,
                       $trailer_id)

      

0


source







All Articles