Restler3 RC4:api-list保持空白

时间:2013-09-21 10:15:57

标签: php autoload restler

我遇到了新的Restler3 RC4的问题:我在resource.json中的API列表只是空的:

{
    "apiVersion": "1",
    "swaggerVersion": "1.1",
    "basePath": "xxxxxx/API/index.php",
    "apis": 
    [

    ]
}    

但是通过取消注释vendor / restler.php文件看起来像这样:

require_once 'Luracast/Restler/AutoLoader.php';
return call_user_func(function () 
{
    $loader = Luracast\Restler\AutoLoader::instance();
    spl_autoload_register($loader);
    return $loader;
});

它会起作用。但是那样的树枝模板的东西等不起作用(看看这里:Restler3 RC4: oAuth doesn't work)。 那么问题现在在哪里? 当然,它是关于自动加载的,对吧?我讨厌自动加载! -.-

谢谢你们, 扬

更新 1 根据{{​​3}}我更新到最新的稳定版本,现在我的resource.json打印出以下内容(第一个'严格标准'出现193次):

<b>Strict Standards</b>:  Only variables should be passed by reference in <b>xxxx/API/restler/vendor/Luracast/Restler/Routes.php</b> on line <b>228</b><br />
<br />
<b>Warning</b>:  Cannot modify header information - headers already sent by (output started at xxxx/API/restler/vendor/Luracast/Restler/Routes.php:228) in <b>xxxx/API/restler/vendor/Luracast/Restler/Filter/RateLimit.php</b> on line <b>119</b><br />
<br />
<b>Warning</b>:  Cannot modify header information - headers already sent by (output started at xxxx/API/restler/vendor/Luracast/Restler/Routes.php:228) in <b>xxxx/API/restler/vendor/Luracast/Restler/Filter/RateLimit.php</b> on line <b>137</b><br />
{
    "apiVersion": "1",
    "swaggerVersion": "1.1",
    "basePath": "xxx/API/index.php",
    "apis": [
        {
            "path": "/resources/consumer.{format}",
            "description": ""
        },
        {
            "path": "/resources/request.{format}",
            "description": ""
        },
        {
            "path": "/resources/shorturl.{format}",
            "description": ""
        },
        {
            "path": "/resources/comment.{format}",
            "description": ""
        },
        {
            "path": "/resources/favorites.{format}",
            "description": ""
        },
        {
            "path": "/resources/options.{format}",
            "description": ""
        },
        {
            "path": "/resources/plugins.{format}",
            "description": ""
        },
        {
            "path": "/resources/themes.{format}",
            "description": ""
        },
        {
            "path": "/resources/updater.{format}",
            "description": ""
        },
        {
            "path": "/resources/preferences.{format}",
            "description": ""
        }
    ]
}

正如你所看到的,我得到了我的api! :)但是我该如何修复警告?

1 个答案:

答案 0 :(得分:0)

我们刚刚发布了更新以修复此严格标准警告

那应该为你解决