-- YaRo <[EMAIL PROTECTED]> wrote
(on Friday, 13 July 2007, 01:34 PM -0700):
> 
> Actually I do know PHP quite well and already understand basics of ZF.
> 
> Let me be more specific: What I need is to make Zend Framework to bypass its
> usual controller/action/view routines in case controller/action not found
> and simply launch script from provided URI e.g. to give back control to
> Apache.
> 
> For now I have came up with cumbersome solution of catching 'controller not
> found' exception on dispatcher->run and then including script from
> requestUri. But this just doesn't looks right to me, I'm sure there are
> better/proper ways to do it.

Please read the documentation on the ErrorHandler. I'd suggest using
this to redirect to the script you wish to run; just make sure that your
RewriteRule's exclude that file from rewriting.

Docs on the ErrorHandler:

    
http://framework.zend.com/manual/en/zend.controller.html#zend.controller.quickstart.go
    
http://framework.zend.com/manual/en/zend.controller.plugins.html#zend.controller.plugins.standard.errorhandler

You'll want to check for the exception type handled, and then either
redirect or serve up an error page.

Funny that you want to throw control from ZF to another app; I'm doing
exactly the opposite in some current projects. ;-)


> Juri Kühn wrote:
> > 
> > Hi,
> > if you want to use ZFs MVC Framework then you should start off with
> > the Zend_Controller manual pages:
> > http://framework.zend.com/manual/en/zend.controller.html
> > 
> > If it is a larger project you should take time to get familiar with ZF
> > specifics. Its worth the time!
> > 
> > With regards,
> > Juri
> > 
> > YaRo wrote:
> >> We have big (very big) application which was started long time ago when
> >> ZF
> >> was still in its childhood. Now the issue came up with moving everything
> >> under Zend Framework's hood. I would like to proceed slowly, step by
> >> step,
> >> with releasing portions of code one after another.
> > 
> >> For example, we have some area, responsible for displaying articles which
> >> currenty have only two major actions:
> > 
> >> 1) displaying last 10 articles (under
> >> <application>/articles/index.php )
> >> 2) displaying specific article in detail (under
> >> <application>/articles/view.php?id=N )
> > 
> >> Now what I would like to achieve is to introduce ZF's bootstrap routine
> >> to
> >> handle *only* controllers/ArticlesController.php with two actions:
> >> default
> >> 'index' (which will show last 10 articles for example) and additional
> >> 'show'
> >> (will be responsible for showing specific article in details). All other
> >> site's areas should be handled by existing scripts as before.
> > 
> >> So it looks like I need to have some standard/default controller which
> >> would
> >> simply pass request URI by usual Apache rules and outputs result as
> >> needed.
> > 
> >> Any advice where to dig?
> >> Thanks in advance.
> > 
> > 
> > 
> 
> -- 
> View this message in context: 
> http://www.nabble.com/moving-existent-application-on-ZF-rails-tf4073789s16154.html#a11587067
> Sent from the Zend Framework mailing list archive at Nabble.com.
> 

-- 
Matthew Weier O'Phinney
PHP Developer            | [EMAIL PROTECTED]
Zend - The PHP Company   | http://www.zend.com/

Reply via email to