PHP Developers Network

A community of PHP developers offering assistance, advice, discussion, and friendship.
 
Loading
It is currently Sat Aug 08, 2020 6:49 pm

All times are UTC - 5 hours




Post new topic Reply to topic  [ 1 post ] 
Author Message
PostPosted: Mon Jul 16, 2007 8:19 pm 
Offline
DevNet Evangelist

Joined: Tue Dec 21, 2004 6:00 pm
Posts: 6267
Location: Winnipeg
Assume a base controller class which declares a composite view object.

The base controller class is then inherited from and extended. The sub-class needs to manipulate the view which is declared in the super-class.

Whats best and why:

1) Keep the view class as protected so derived classes have access to it - it's my common practice to keep variables private.
2) Provide the required API to manipulate the view in the base controller - starting to feel like MVP instead of MVC?

Perhaps a trivial view API such GetView() would suffice.

What do you say and why?


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

All times are UTC - 5 hours


Who is online

Users browsing this forum: No registered users and 13 guests


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:  
cron
Powered by phpBB® Forum Software © phpBB Group