Skip to end of metadata
Go to start of metadata

<ac:macro ac:name="unmigrated-inline-wiki-markup"><ac:plain-text-body><![CDATA[

<ac:macro ac:name="unmigrated-inline-wiki-markup"><ac:plain-text-body><![CDATA[

Zend Framework: Intercepting Filters Component Proposal

Proposed Component Name Intercepting Filters
Developer Notes http://framework.zend.com/wiki/display/ZFDEV/Intercepting Filters
Proposers Mike Borozdin, author
Darby Felton, Zend liaison
Revision 1.1 - 18 July 2006: Some thoughts of mine. (wiki revision: 14)

Table of Contents

1. Overview

Zend Framework lacks of intercepting filters that should be executed before a specified controllers or actions in order to make some validations, for example, check whether user is authenticated if not then redirect to a login page, the code can look something like this

For instance, we have PagesController that has four actions: viewAction(), addAction(), editAction(), removeAction(), the last three actions can be performed by autenticates users only, so we must check. Sure, we can put this logic to the action method or write Authenticated_Controller_Action, but what if we have to make some other validations.

Zend Framework has a plugin mechanism that is not documented now, I tried to make a plugin that extends Zend_Controller_Plugin_Abstract but it lacks of interaction with controllers and action, besides it can't stop the routing process.

If you have any ideas, please comment or e-mail me.

2. References

3. Component Requirements, Constraints, and Acceptance Criteria

zone: Missing {zone-data:requirements}

4. Dependencies on Other Framework Components

zone: Missing {zone-data:dependencies}

5. Theory of Operation

zone: Missing {zone-data:operation}

6. Milestones / Tasks

zone: Missing {zone-data:milestones}

7. Class Index

zone: Missing {zone-data:class-list}

8. Use Cases

zone: Missing {zone-data:use-cases}

9. Class Skeletons

zone: Missing {zone-data:skeletons}
]]></ac:plain-text-body></ac:macro>

]]></ac:plain-text-body></ac:macro>

Labels:
None
Enter labels to add to this page:
Please wait 
Looking for a label? Just start typing.
  1. Jul 22, 2006

    <p>I found a solution <a class="external-link" href="http://www.sitepoint.com/forums/showthread.php?t=404478">http://www.sitepoint.com/forums/showthread.php?t=404478</a>, just need to test it.</p>

  2. Jan 22, 2007

    <ac:macro ac:name="note"><ac:parameter ac:name="title">Zend Comments</ac:parameter><ac:rich-text-body>
    <p>The functionality implied by the described use cases is supported through the use of <a href="http://framework.zend.com/manual/en/zend.controller.plugins.html">controller plugins</a>.</p></ac:rich-text-body></ac:macro>