15

I'm new to Zend Framework (not to PHP), and I need to create a REST based API using Zend.

I've seen examples using Zend_Rest_Server, however other sources state that that has been deprecated.

I'm unable to find a solid example which shows how I should be building such an API.

Raj
  • 22,346
  • 14
  • 99
  • 142
siliconpi
  • 8,105
  • 18
  • 69
  • 107
  • exact duplicate - http://stackoverflow.com/questions/4930146/how-to-create-web-services-in-zend-framework/ – Raj Mar 15 '11 at 13:56

3 Answers3

26

Zend_Rest_Server is indeed deprecated since ZF 1.9, you should use Zend_Rest_Controller instead. The following blog posts could be helpful : Building RESTful Services with Zend Framework and Create RESTful Applications Using The Zend Framework.

wimvds
  • 12,790
  • 2
  • 41
  • 42
1

May be this link would be helpful: Creating a PHP REST API Using the Zend Framework. This code example support REST data in the format of XML and JSON.

Prerequisites:

PHP version > 5
Zend Framework 1.9.2 (at the minimum)
falko
  • 1,407
  • 14
  • 15
1

If you want something a little more in details, you can check the book

Zend Framework 2 Application Development.

The book explains construction of API oriented system in ZF2, through examples.

At the end of book you get:

  • ZF2 API
  • ZF2 Client side app.

The book has a lot of syntax errors as well as any book for programming, but it's only one on the market at this moment.

tasmaniski
  • 4,767
  • 3
  • 33
  • 65