Zend Framework

Zend_Rest_Router must implements static method getInstance

Details

  • Type: Bug Bug
  • Status: Resolved Resolved
  • Priority: Major Major
  • Resolution: Fixed
  • Affects Version/s: None
  • Fix Version/s: 1.9.7
  • Component/s: Zend_Rest_Route
  • Labels:
    None

Description

Sorry for my crappy english!

I use ini file to configure the router.

  1. routes.foobar.type = "Zend_Rest_Route"

The rewrite router will try to instanciate Zend_Rest_Route calling

  1. $route = call_user_func(array($class, 'getInstance'), $info);

It will call the static method getInstance of Zend_Rest_Route superclass and return a instance of Zend_Controller_Router_Route_Module

It can be fixed easily, only need to override getInstance method himself, and return a Zend_Rest_Route instance.

We can use late static binding too, but php 5.3 will be required !

My regards!

Activity

Hide
Luke Crouch added a comment -

Committed code. Need to update documentation to show config ini usage.

Show
Luke Crouch added a comment - Committed code. Need to update documentation to show config ini usage.

People

Vote (0)
Watch (0)

Dates

  • Created:
    Updated:
    Resolved: