Re: [PHP-DEV] Grafts, Traits, horizontal reuse

2008-11-24 Thread Christopher Vogt
Hej Marcus, I like your approach. It is clear and simple. It would probably solve 90% of the cases, where delegation is needed. I want to add that a manually defined method should automatically overwrite a delegated method of the same name. But I also want to bring up two reasonable situations y

[PHP-DEV] Re: Fatal error: Call to a member function on a non-object

2008-11-18 Thread Christopher Vogt
Hej, >> echo $user['fullname']; // no error at all, $user['fullname'] === NULL >> >> Shouldn't this at least trigger a Notice? > > Check your error handling settings, probably warnings/notices are disabled. I now found it in the documentation os the String type http://php.net/language.types.str

[PHP-DEV] Re: Fatal error: Call to a member function on a non-object

2008-11-17 Thread Christopher Vogt
Hi Karsten, >> echo $user['fullname']; // no error at all, $user['fullname'] === NULL >> >> Shouldn't this at least trigger a Notice? > > Check your error handling settings, probably warnings/notices are disabled. reproduce code: Best regards Christopher -- PHP Internals - PHP Runtime Deve

Re: [PHP-DEV] Fatal error: Call to a member function on a non-object

2008-11-17 Thread Christopher Vogt
Hi Kalle, > I personally don't really mind it, as you got the instanceof and > typehinting to check for whenever a variable is an object, so I would > say its more of a user design issue. Fatal errors just requires you to > refactor your code so your code shouldn't emit such things which I'm > alr

Re: [PHP-DEV] Fatal error: Call to a member function on a non-object

2008-11-17 Thread Christopher Vogt
Hej Jochem, I understand there are many PHP beginners flooding the wrong lists with the wrong questions, so I don't mind your harsh response. But I am not one of them. > please don't post this kind of question to internals. use [EMAIL PROTECTED] This was/is a question if something is worth a cha

[PHP-DEV] Fatal error: Call to a member function on a non-object

2008-11-17 Thread Christopher Vogt
Hej, I use PHP 5.2.6. I am refactoring some code to use more object-orientation. I encounter a problem, where the new object-oriented version results in a fatal error, where the old array-oriented version didn't. I fetch records a database. Sometime it happens that a record does not exist anymore

Re: [PHP-DEV] Grafts, Traits, horizontal reuse

2008-11-16 Thread Christopher Vogt
Hej, >> I really liked to see the Grafts proposal. > Well, I'm still in love with the more powerful (because they are > interweaveable(breakable)) Traits ;) I don't think there has to be a choice between Grafts and Traits. They serve different purposes and I don't see a reason they shouldn't co-e

[PHP-DEV] Grafts, Traits, horizontal reuse

2008-11-13 Thread Christopher Vogt
Hej everybody, I had a chat with Stefan about his Traits/Grafts RFC and he suggested we should rather continue a discussion here. I really liked to see the Grafts proposal. In traits and regular inheritance the implementation code of several entities is somehow mixed and as a result one entities

[PHP-DEV] gnaaa. Hit the submit button too early.

2008-11-13 Thread Christopher Vogt
Gnaaa. Hit the submit button too early. Excuse the rubbish. I will post the correct mail in a moment. Christopher -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

[PHP-DEV] Traits,Grafts, horizontal reuse

2008-11-13 Thread Christopher Vogt
Hej everybody, I had a chat with Stefan about his Traits/Grafts RFC and he suggested we should rather continue a discussion here. I really liked to see the Grafts proposal. In traits and regular inheritance the implementation code of several entities is somehow mixed and as a result one entities