Hi,

Am Montag, den 18.02.2008, 20:27 +0100 schrieb [EMAIL PROTECTED]:
[...]
> Thank you for your attention and I'm looking forward to hear your comments
> :)

What about abstract methods in traits? I think this could be handy to
enforce the user class implement a data getter.

trait Foo {
    public function doSomething()
    {
        return str_replace("foo", "bar", $this->_getString());
    }
    abstract protected _getString();
}

class Consumer
{
    use Foo;
    protected function _getString()
    {
         return "foo";
    }
}

What do you think?

cu, Lars

Attachment: signature.asc
Description: Dies ist ein digital signierter Nachrichtenteil

Reply via email to