-- j5 <[EMAIL PROTECTED]> wrote (on Thursday, 20 November 2008, 11:29 AM -0800): > Should these callback functions be added to the action controller? Or added > as new methods of a class extending ContextSwitch?
ContextSwitch allows for arbitrary callbacks -- any valid PHP callback can be used. It's up to you to determine which works best for your application. > Matthew Weier O'Phinney-3 wrote: > > -- Sudheer <[EMAIL PROTECTED]> wrote > > (on Thursday, 20 November 2008, 06:48 PM +0530): > > > I have few questions: > > > > > > 1. Would it make sense to write a PDF file sender Action Helper for ZF? > > > I was wondering whether we could add this feature to contextSwitch > > > Action Helper. > > > 2. Or would it make more sense to write a generic file sender Action > > > Helper with various adapters - PDF, CSV, Text, etc? 3. Does something > > > like this exist already? > > > > > > The Action Helper would perform the following: > > > 1. Disable layout > > > 2. Disable view > > > 3. Set appropriate headers > > > 4. Send the file > > > > ContextSwitch allows you to specify arbitrary callbacks to call > > per-context; I'd simply use it and create a callback that performs these > > tasks. -- Matthew Weier O'Phinney Software Architect | [EMAIL PROTECTED] Zend Framework | http://framework.zend.com/