我有這個我的對象類和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) {
}
}
當你知道文檔註釋正確的語法,你爲什麼不使用它們所需的名單? – Luracast
因爲據我所知,我正在使用它們。 – Gargoyle
查看https://phpdoc.org/docs/latest/references/phpdoc/tags/var.html還注意到restler不支持像例2那樣的複合語句 – Luracast