bitweaver
Wiki
wiki Home
List Pages
wiki Books
Orphan Pages
wiki Rankings
Photos
List Galleries
Forums
Browse forums
Files
List Galleries
Categories
List Categories
Sign In
Message Boards
»
11. Development - Architecture and feature requests
Newest
Oldest
Threaded
5
10
20
50
100
All
Messages
why all those static calls in object context?
Post Reply
Roland Wilczek
Joined: 15 Jul 2006
why all those static calls in object context?
Posted:16 Aug 2006 (15:49 UTC)
spiderr
Joined: 08 Feb 2004
Posted:17 Aug 2006 (19:29 UTC)
Post Reply
Page 1 of 1
1
Post
Title
Login
If you are already registered, please enter your login credentials.
Your Name
Anonymous Post
Content Format
Tiki Wiki Syntax
Allow HTML
{quote format_guid="bbcode" comment_id="7265" user="blaufalke"}Is there a reason for those static calls on inherited methods in object context? Example: [code:1:db3bc4c6fe] class LibertyContent extends LibertyBase { // ... } class LibertyAttachable extends LibertyContent { // ... function expunge () { $this->doSomething(); return LibertyContent::expunge(); } // ... } class myPackage extends LibertyAttachable { function expunge() { $this->doSomethingElse(); return LibertyAttachable::expunge(); } } [/code:1:db3bc4c6fe] A lot of bitweaver's methods are called statically [b:db3bc4c6fe]and[/b:db3bc4c6fe] use $this (including parent-constructors!). This is against the documented PHP-behaviour and relies on the not intended presence of $this in statically called methods once the class has been used to instantiate an object. Additionally it makes it very hard to really use bitweaver's objects for there is no guarantee which object $this will actually reference (think of recursive calls ...). I can see no sense in this kind of method calls. Why don't you use parent::expunge() for example? Is there someone to explain?{/quote}
Recent Page Changes
welcome to bitweaver.org
Bitweaver Overview
ReleaseTwo Schema Changelog 2006
PressReleaseOne
Spider's Web
Press Release Two
BitcommercePackage
InfiniBand vs Ethernet Performance
InfiniBand for Dummies
Show More…