PHP Developers Network

A community of PHP developers offering assistance, advice, discussion, and friendship.
 
Loading
It is currently Sat Oct 19, 2019 10:58 am

All times are UTC - 5 hours




Post new topic Reply to topic  [ 10 posts ] 
Author Message
PostPosted: Sat Feb 15, 2014 5:12 am 
Offline
The Ninja Space Mod
User avatar

Joined: Fri Aug 05, 2005 1:53 pm
Posts: 6424
Location: Paradise, CA


Top
 Profile  
 
PostPosted: Sat Feb 15, 2014 9:45 am 
Offline
Moderator
User avatar

Joined: Tue Nov 09, 2010 3:39 pm
Posts: 6425
Location: Montreal, Canada
My abstract or super classes sit one level above their child classes specifically so I can have \namespace\Foo and \namespace\Foo\Bar where Bar is a child of Foo

_________________


Top
 Profile  
 
PostPosted: Sat Feb 15, 2014 7:39 pm 
Offline
Spammer :|
User avatar

Joined: Wed Oct 15, 2008 2:35 am
Posts: 6617
Location: WA, USA
Generally I'll go with MyLibrary\Reader as the base class and MyLibrary\Reader\* as the derived classes, because those classes are specialized instances of the "Reader" concept. Occasionally though I'll have an interface as the "main" class and then use an abstract class as a partial, common-functionality implementation - a base - for other classes, in which case I might go with MyLibrary\IReader and MyLibrary\Reader\ReaderBase.


Top
 Profile  
 
PostPosted: Sun Feb 16, 2014 9:14 am 
Offline
Moderator
User avatar

Joined: Mon Nov 03, 2003 7:13 pm
Posts: 5978
Location: Odessa, Ukraine


Top
 Profile  
 
PostPosted: Mon Feb 17, 2014 4:12 pm 
Offline
The Ninja Space Mod
User avatar

Joined: Fri Aug 05, 2005 1:53 pm
Posts: 6424
Location: Paradise, CA


Top
 Profile  
 
PostPosted: Tue Feb 18, 2014 6:27 pm 
Offline
Site Administrator
User avatar

Joined: Wed Aug 25, 2004 7:54 pm
Posts: 13592
Location: New York, NY, US

_________________
(#10850)


Top
 Profile  
 
PostPosted: Thu Feb 20, 2014 4:06 pm 
Offline
DevNet Master
User avatar

Joined: Wed Jun 27, 2007 9:44 am
Posts: 4313
Location: Sofia, Bulgaria
The OP instantly reminded me of viewtopic.php?f=19&t=127265
:)

Cheers

_________________
There are 10 types of people in this world, those who understand binary and those who don't


Top
 Profile  
 
PostPosted: Thu Feb 20, 2014 6:06 pm 
Offline
Site Administrator
User avatar

Joined: Wed Aug 25, 2004 7:54 pm
Posts: 13592
Location: New York, NY, US
Ahhhhh ... 2011 and the Inheritance vs Composition discussions! I couldn't read more than a few pages ... but I am sure that Jenk was right! :drunk:

_________________
(#10850)


Top
 Profile  
 
PostPosted: Thu Feb 20, 2014 6:32 pm 
Offline
DevNet Master
User avatar

Joined: Wed Jun 27, 2007 9:44 am
Posts: 4313
Location: Sofia, Bulgaria

_________________
There are 10 types of people in this world, those who understand binary and those who don't


Top
 Profile  
 
PostPosted: Sat Feb 22, 2014 12:43 pm 
Offline
Site Administrator
User avatar

Joined: Wed Aug 25, 2004 7:54 pm
Posts: 13592
Location: New York, NY, US
Never have so many, argued so long, about so many things they basically agree on!!! ;)

_________________
(#10850)


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 10 posts ] 

All times are UTC - 5 hours


Who is online

Users browsing this forum: Majestic-12 [Bot] and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  
Powered by phpBB® Forum Software © phpBB Group