【问题标题】:How to get array of dates as POST parameter如何获取日期数组作为 POST 参数
【发布时间】:2013-10-02 06:12:26
【问题描述】:

看起来不可能将日期数组作为参数,例如:

@param array $dates Dates array {@type date} {@from body}

有什么方法可以让 Restler 验证日期数组的输入,例如:

{
   "dates": ["2013-01-01", "2013-01-02"]
}

现在我得到:Class 'date' not found in ...

【问题讨论】:

    标签: php restler


    【解决方案1】:

    这适用于最新的 master 分支!只是在 Type 类中添加了测试它的代码

    在这里查看http://restler3.luracast.com/tests/param/explorer/index.html#!/type/createDates_post

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2022-06-14
      • 1970-01-01
      • 1970-01-01
      • 2012-04-27
      相关资源
      最近更新 更多