PHPackages                             thetwelvelabs/zeus - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [HTTP &amp; Networking](/categories/http)
4. /
5. thetwelvelabs/zeus

ActiveLibrary[HTTP &amp; Networking](/categories/http)

thetwelvelabs/zeus
==================

Zend Framework 1.x RESTful Bundle

1.0.1(13y ago)61.4k2LGPL-3.0PHPPHP &gt;=5.2.4

Since May 23Pushed 12y ago2 watchersCompare

[ Source](https://github.com/chriswoodford/Zend-Framework-RESTful-Bundle)[ Packagist](https://packagist.org/packages/thetwelvelabs/zeus)[ Docs](http://thetwelvelabs.com)[ RSS](/packages/thetwelvelabs-zeus/feed)WikiDiscussions master Synced today

READMEChangelogDependencies (1)Versions (3)Used By (0)

Zeus - A RESTful Bundle for Zend Framework 1.x
==============================================

[](#zeus---a-restful-bundle-for-zend-framework-1x)

The main purpose of *Zeus* is to help you easily create hierarchical routes to RESTful controllers.

The initial code base for Zeus was created by @weierophinney over a series of articles on his blog,

Allow me to give credit where credit is due:

- Building RESTful Services with Zend Framework [1](http://mwop.net/matthew/archives/228-Building-RESTful-Services-with-Zend-Framework.html)
- Responding to Different Context Types in RESTful ZF Apps [2](http://mwop.net/blog/233-Responding-to-Different-Content-Types-in-RESTful-ZF-Apps)

Why Zeus?
---------

[](#why-zeus)

> There are so many different RESTful implementations for Zend Framework, why bother creating another one?

The great majority of Zend Framework RESTful implementation require you to use *Zend\_Rest\_Route*. By default, *Zend\_Rest\_Route* creates these routes:

```
  /product/ratings/
  /product/ratings/:id

```

I find this kind of route to be ambiguous in a RESTful setting. Does the :id refer to the product or the rating? I would much rather see routes that look like this:

```
  /products/:id
  /products/:id/ratings

```

This is precisely what Zeus allows you to do.

Benefits
--------

[](#benefits)

Coming soon...

Using Zeus
----------

[](#using-zeus)

### Setting up Zeus

[](#setting-up-zeus)

Add these lines to your application.ini files:

#### Initialization

[](#initialization)

```
  autoloaderNamespaces[] = Zeus_

  pluginPaths.Zeus_Application_Resource = "Zeus/Application/Resource"
  pluginPaths.Zeus_Controller_Plugin = "Zeus/Controller/Plugin"

```

#### Configuration

[](#configuration)

```
  resources.zeus[] =

```

### RESTful Routes

[](#restful-routes)

There are two ways that you can create RESTful routes

#### Using PHP

[](#using-php)

```
  $route = new Zeus_Rest_Route(
      'products/:id/ratings',
      array(
          'module' => 'products',
          'controller' => 'ratings',
          'action' => 'index',
          'id' => '',
      )
  );

```

#### Using an .ini file

[](#using-an-ini-file)

```
  routes.productRatings.type = "Zeus_Rest_Route"
  routes.productRatings.route = "products/:id/ratings"
  routes.productRatings.defaults.module = "products"
  routes.productRatings.defaults.controller = "ratings"
  routes.productRatings.defaults.action = "index"

```

### RESTful Controllers

[](#restful-controllers)

In order to use Zeus your controllers must, at minimum, implement Zeus\_Rest\_Controller. There are a couple of ways that you can do this

If you want your entire application to be RESTful, the easiest thing to do is to have all of your controllers extend Zeus\_Rest\_RestfulController

```
  class YourController extends Zeus_Rest_RestfulController
  {

  }

```

Zeus\_Rest\_RestfulController will require all of your controllers to have the following methods: index, get, post, put, and delete.

If you only want certain controllers to be RESTful and allow other controllers to not be RESTful, you can have your RESTful controllers extends Zeus\_Rest\_BaseController and implement Zeus\_Rest\_Controller

```
  class YourRestfulController
      extends Zeus_Rest_BaseController
      implements Zeus_Rest_Controller
  {

  }

  class YourRegularController
      extends Zend_Controller_Action
  {

  }

```

### RESTful Views

[](#restful-views)

Coming soon...

###  Health Score

30

—

LowBetter than 62% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity21

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity59

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~5 days

Total

2

Last Release

4784d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/a2d84b3d83f9fbf406a9702429df0cfb0b904836d86cc13870a31d5ead9f1597?d=identicon)[chriswoodford](/maintainers/chriswoodford)

---

Top Contributors

[![chriswoodford](https://avatars.githubusercontent.com/u/249055?v=4)](https://github.com/chriswoodford "chriswoodford (22 commits)")

---

Tags

restZend Framework

### Embed Badge

![Health badge](/badges/thetwelvelabs-zeus/health.svg)

```
[![Health](https://phpackages.com/badges/thetwelvelabs-zeus/health.svg)](https://phpackages.com/packages/thetwelvelabs-zeus)
```

###  Alternatives

[zircote/swagger-php

Generate interactive documentation for your RESTful API using PHP attributes (preferred) or PHPDoc annotations

5.3k144.5M605](/packages/zircote-swagger-php)[psr/link

Common interfaces for HTTP links

2.5k152.8M84](/packages/psr-link)[league/fractal

Handle the output of complex data structures ready for API output.

3.8k67.2M554](/packages/league-fractal)[friendsofsymfony/rest-bundle

This Bundle provides various tools to rapidly develop RESTful API's with Symfony

2.8k75.9M342](/packages/friendsofsymfony-rest-bundle)[lexik/jwt-authentication-bundle

This bundle provides JWT authentication for your Symfony REST API

2.6k62.6M257](/packages/lexik-jwt-authentication-bundle)[nelmio/api-doc-bundle

Generates documentation for your REST API from attributes

2.4k67.4M262](/packages/nelmio-api-doc-bundle)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
