Tokotome
Tokotome

Reputation: 91

Restler 3 post call param with one value or another

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

Upvotes: 0

Views: 46

Answers (1)

Arul Kumaran
Arul Kumaran

Reputation: 993

Use the following syntax

@param Class_A|Class_B $data

Read PHPDoc Reference for more info

Upvotes: 0

Related Questions