Issues

ZF-8537: Zend_Rest_Router must implements static method getInstance

Issue Type: Bug Created: 2009-12-13T09:05:12.000+0000 Last Updated: 2009-12-30T10:04:09.000+0000 Status: Resolved Fix version(s): - 1.9.7 (11/Jan/10)

Reporter: coolmic (coolmic) Assignee: Luke Crouch (lcrouch) Tags: - Zend_Rest_Route

Related issues: Attachments:

Description

Sorry for my crappy english!

I use ini file to configure the router.

routes.foobar.type = "Zend_Rest_Route"

The rewrite router will try to instanciate Zend_Rest_Route calling

$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 :D !

My regards!

Comments

Posted by Luke Crouch (lcrouch) on 2009-12-29T20:05:55.000+0000

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

Have you found an issue?

See the Overview section for more details.

Copyright

© 2006-2016 by Zend, a Rogue Wave Company. Made with by awesome contributors.

This website is built using zend-expressive and it runs on PHP 7.

Contacts