-- Kevin McArthur <[EMAIL PROTECTED]> wrote (on Sunday, 26 November 2006, 02:21 PM -0700): > Instead of an implicit ->addDefaultRoutes whould it not make more sense to > have the defaults enabled by... default.. and instead provide a > removeDefaultRoutes() method for those who want to remove the default > functionality? > > Im curious what the purpose of addDefaultRoute's very existance is.
I don't actually maintain the RewriteRouter -- Martel does. I'll defer to his reply (and I'm sure he will). > ----- Original Message ----- > From: "Matthew Weier O'Phinney" <[EMAIL PROTECTED]> > To: <[email protected]> > Sent: Sunday, November 26, 2006 2:01 PM > Subject: Re: [fw-general] revision 1863 controller front > > > > -- Michael Depetrillo <[EMAIL PROTECTED]> wrote > > (on Sunday, 26 November 2006, 11:33 AM -0800): > > > How would you do this with the current incubator controller? > > > > > > $controller = new Zend_Controller_Front(); > > > $controller->setControllerDirectory("controllers"); > > > $router = new Zend_Controller_RewriteRouter(); > > > $router->addDefaultRoutes(); > > > $controller->setRouter($router); > > > > > > This throws a Fatal Error for me saying _construct() is private. > > > > $router = new Zend_Controller_RewriteRouter(); > > $router->addDefaultRoutes(); > > $controller = Zend_Controller_Front::getInstance(); > > $controller->setControllerDirectory('controllers') > > ->setRouter($router); > > > > > Also, is the incubator documentation located here up-to-date? > > > > > > http://framework.zend.com/apidoc/incubator/ > > > > No, that's only built when new releases are made. You'll have to build > > API docs from subversion manually. > > > > > I don't see a getInstance() method available. Are there any articles > > > available > > > on generating our own documentation? > > > > Install phpdocumentor, and then run phpdoc --help ;-) > > > > > > > On 11/26/06, Matthew Weier O'Phinney <[EMAIL PROTECTED]> wrote: > > > > > > -- Michael Patrick <[EMAIL PROTECTED]> wrote > > > (on Saturday, 25 November 2006, 11:37 PM -0600): > > > > Michael Depetrillo wrote: > > > > > I have revision 1863 and the __construct() method of > > > Zend_Controller_Front > > > > > is private causing php 5.1.6 to throw a fatal error. > > > > > > Note: it's been this way in core since the beginning; the change > > > occurred in the incubator. > > > > > > > Looks like in 1646 the incubator Front Controller went back to > > > singleton. > > > > > > > > * Reinstated getInstance(), based on feedback from: > > > > * > > > > http://drone-alliance.org/wordpress/2006/11/11/ > > > discovering-the-zend-framework-020-preview/ > > > > * many questions on-list > > > > * Front controllers should never have more than one instance > > > > * Added resetInstance() method to front controller, which allows > > > setting > > > the > > > > object to a known clean state -- allowing tests to run normally. > > > > > > I emailed the fw-mvc list about this, and thought I cross-posted to > > > fw-general; guess the cross-post didn't happen. > > > > > > After the large number of people expressing confusion about the lack > > > of > > > getInstance(), and some discussion with others in the MVC group and > > > dev > > > team, I reverted to using a singleton instance of the front > > > controller. > > > This allows it to keep backward compatability with pre-0.2.0 core > > > releases, and has several other benefits as well. resetInstance() was > > > added to allow reverting to a known clean state. > > > > > > -- > > > Matthew Weier O'Phinney > > > PHP Developer | [EMAIL PROTECTED] > > > Zend - The PHP Company | http://www.zend.com/ > > > > > > > > > > > > > > > -- > > > Michael DePetrillo > > > [EMAIL PROTECTED] > > > Mobile: (858) 761-1605 > > > AIM: klassicd > > > > -- > > Matthew Weier O'Phinney > > PHP Developer | [EMAIL PROTECTED] > > Zend - The PHP Company | http://www.zend.com/ > -- Matthew Weier O'Phinney PHP Developer | [EMAIL PROTECTED] Zend - The PHP Company | http://www.zend.com/
