Restler 3 post call param with one value or another

37 views Asked by At

I'm using Reslter 3 and I have a post call with parameter(and the class) implemented. All fields are required. I want to extend it to work again with one param but from one class or a different one. Is it possible? The current implementation is :

* @param Class_A $data

and I want it to work something like this:

* @param Class_A $data || Class_B $data
1

There are 1 answers

0
Arul Kumaran On

Use the following syntax

@param Class_A|Class_B $data

Read PHPDoc Reference for more info