How to create an Odata Service using PHP?

拜拜、爱过 提交于 2019-12-10 21:06:05

问题


I am using Kendo-UI, in this framework we can read the data using ODATA, JSON-P, JSON. We are successfully develop the data in JSON-P and JSON in PHP using(json_encode()). but we are unable to create ODATA using PHP.

We should have to make the encoded data in ODATA format using PHP. Please look at the code in which we needed this. Please look below.

{field: "Status", title: "Status", width: "150px", editor: function(container, options) {
          $('<input data-text-field="Name" data-value-field="Id" data-bind="value:' + options.field + '"/>').appendTo(container).kendoComboBox({
    index: 0,
    dataTextField: "Name",
    dataValueField: "Id",
    filter: "contains",
    dataSource: {
        type: "odata",
        serverFiltering: true,
        serverPaging: true,
        pageSize: 20,
        transport: {
            read: "http://odata.netflix.com/Catalog/Titles"
        }
    }
                  });
                 }
                 },

Is there any idea to encode the data into this style "http://odata.netflix.com/Catalog/Titles?$format=json&$inlinecount=allpages&$callback=callback&$top=20"

Thanks

A


回答1:


You can find an OData Producer using PHP here: http://odataphpproducer.codeplex.com

An overview of the SDK can be found here: http://blogs.msdn.com/b/interoperability/archive/2011/09/09/the-odata-producer-library-for-php-is-here.aspx



来源:https://stackoverflow.com/questions/9836764/how-to-create-an-odata-service-using-php

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!