On 4/25/08, Aldemar Bernal <[EMAIL PROTECTED]> wrote:
>
> Hi Denis,
>
> I understand what you are trying to do, unfortunely get_class(self) will
> not work if self is an extended class (as Zend_Db tables are), the only
> workaround (until 5.3 is out where will be possible to do this) is to create
> a method, this is how I do it:
>
> create an interface
>
> interface My_Interface
> {
> public static function init();
> }
>
> then create your class
>
> class My_Class extends Zend_Db_Table implements My_Interface
> {
> ...
>
> public static function init()
> {
> return new self;
> }
> }
>
> then, when you need the class you must use $myClass::init() instead of new
> $myclass
>
> Hope it helps,
Ah, thank you, that was indeed the issue I had before and which I confused
with this one.
Aldemar
--
Vincent