私はオブジェクトクラスとAPIクラスにこれを持っています。 task_list_id
またはdisplay_order
を送信せずに投稿に電話することができます。私がちょうどtitle
を渡す限り、それはメソッドを呼び出しています。Restlerは必要なプロパティを必要としません
class BaseTaskObj
{
/// @var int $task_list_id The SQL ident of the Task List to use for the Task. {@min 1}{@required true}
public $task_list_id;
}
class PostTaskObj extends BaseTaskObj
{
/// @var int $assigned_id The SQL ident of the Person who this task is assigned to {@min 1}{@required false}
public $assigned_id;
}
class MyTaskAPI {
/**
* Creates a new Task associated with an existing task list.
*
* @param PostTaskObj $info The details of the Task object to create. {@required title, display_order}
*
* @status 201
*
* @return int The SQL ident of the newly created Task
*/
function post(PostTaskObj $info) {
}
}
を必要としませんか?それらを作る無効なパラメータで必要なリストを上書き
{@required title, display_order}
を持っていますか – Luracast私の知る限り、私はそれらを使用しています。 – Gargoyle
https://phpdoc.org/docs/latest/references/phpdoc/tags/var.html restlerは例2のように '複合文 'をサポートしていないことにも注意してください。 – Luracast