-- Саша Стаменковић <umpir...@gmail.com> wrote
(on Wednesday, 25 November 2009, 09:51 AM +0100):
> Thats ok, but I want to use Zend_Form_Element_* classes, don't want to
> use myElement. I want all elements have my new getFullyQualifiedName() method.

Two options:

 * Copy the Zend_Form_Element class to your own tree, and mofidy
   getFullyQualifiedName(), and ensure that your tree is earlier on the
   include_path than the ZF library

 * Create your own custom base element, and then extend it for the
   various elements you actually use. This will likely mean copying some
   functionality from existing elements in a few cases (though most
   simply define the $helper property).

Either way, you'll likely end up re-implementing existing functionality.


> On Wed, Nov 25, 2009 at 9:37 AM, Jigal sanders <jigalroe...@gmail.com> wrote:
> 
>     I suppose something like:
> 
>     Class myElement extends Zend_Form_Element{
>     protected function getFullyQualifiedName(){
>        // your code here
> 
> 
>     }
> 
>     }
> 
>     On Wed, Nov 25, 2009 at 9:34 AM, Саша Стаменковић <umpir...@gmail.com>
>     wrote:
> 
>         How? :)
> 
>         Regards,
>         Saša Stamenković
> 
> 
> 
>         On Wed, Nov 25, 2009 at 9:26 AM, Jigal sanders <jigalroe...@gmail.com>
>         wrote:
> 
>             I suppose so
> 
> 
>             On Wed, Nov 25, 2009 at 9:18 AM, umpirsky <umpir...@gmail.com>
>             wrote:
> 
> 
>                 Hi.
> 
>                 Is there a way to override Zend_Form_Element methods?
> 
>                 I have extended Zend_Form and subform, now I want to override
>                 Zend_Form_Element::getFullyQualifiedName(). Is there a way to
>                 do it without
>                 need to extend all Zend_Form_Element_* classes?
> 
>                 Regards,
>                 Saša Stamenković.
>                 --
>                 View this message in context: http://n4.nabble.com/
>                 Overriding-Zend-Form-Element-methods-tp787370p787370.html
>                 Sent from the Zend Framework mailing list archive at
>                 Nabble.com.
> 
> 
> 
> 
>             --
>             Met vriendelijke groet,
> 
>             Jigal Sanders
>             A.J. Ernststraat 739
>             1082 LK Amsterdam
>             Mobiel: 06-42111489
> 
> 
> 
> 
> 
> 
>     --
>     Met vriendelijke groet,
> 
>     Jigal Sanders
>     A.J. Ernststraat 739
>     1082 LK Amsterdam
>     Mobiel: 06-42111489
> 
> 

-- 
Matthew Weier O'Phinney
Project Lead            | matt...@zend.com
Zend Framework          | http://framework.zend.com/

Reply via email to