This was very handy, thanks :)
On Fri, Aug 22, 2008 at 9:53 AM, Matthew Weier O'Phinney <matthew@zend.com> wrote:
-- Gordon Ross <gr306@ucs.cam.ac.uk> wrote(on Friday, 22 August 2008, 03:15 PM +0100):
> Is there a way to add this to be a included by default ?As in you'd like it in the standard ZF distribution, or that you want
the plugin path enabled by default?
If you would like something like this in the standard ZF distribution,
please file a feature request in the issue tracker.
--
> ________________________________________
> From: Matthew Weier O'Phinney [matthew@zend.com]
> Sent: 21 August 2008 15:08
> To: fw-mvc@lists.zend.com
> Subject: Re: [fw-mvc] Include raw HTML into Zend_Form
>
> -- Gordon Ross <gr306@ucs.cam.ac.uk> wrote
> (on Wednesday, 20 August 2008, 10:11 PM +0100):
> > Thanks for that. Where should I put it ? I don't really want to slap
> > it in the main Zend directories...
>
> Well, as the class is called "My_Form_Element_RawText", I'd put it in
> library/My/Form/Element/RawText.php.
>
> Basically, we recommend you create your own, unique namespace prefix --
> such as we have 'Zend_', and Solar uses 'Solar_', etc. Use this as a
> top-level directory underneath your library/ directory (which will
> contain Zend/ as well), and you should be all set.
>
> You'll need to tell Zend_Form about the location of this prefix, though;
> you can do that easily enough:
>
> $form->addPrefixPath('My_Form_Element', 'My/Form/Element/', 'element');
>
> and you'll be all set to start using it.
>
Matthew Weier O'Phinney
Software Architect | matthew@zend.com
Zend Framework | http://framework.zend.com/
没有评论:
发表评论