It has to be inside the __construct(); -- Classes are wrappers for a collection of properties and methods, all code constructs that are part of them have to be part of one of those methods (the functions) however, and not out and about on their own.
The Following User Says Thank You to delayedinsanity For This Useful Post:
So the way You explained it to me, the problem is solved.
but..., if this is a free (but respectful) opinion forum:
It doesn's have so much logic about it, does it?
An include is a perfectly neutral and static instruction no matter where it is placed.
Since I like to have all my properties defined at the class for a reason of self organization, my cry for help now is where do I put my 23 properties all with:
public function setAction($action)
$this->action = $action;
public function getAction()
It fills up my class text space. In order to see/correct all the other functions, I must scroll and scroll.
When I started working with c# some weeks ago, there was a feature at the visual studio editor very nice which was the possibility of puting 2 marks, one at the beginning and other at the end of the text we wanted to hide, and then we could hide it (it was there, but You couldn't see it, You could see only the mark).
I am presently working with editplus editor which in my opinion is great because it's very light on weight and does what I need an html/php editor has to do, but doesn't seem to have this feature.
Which way can I go ?
Answering this thread is now, not so important as at the beginning, as there are no errors to solve, but I sure would appreciate some suggestions from the most experienced colleagues.
Last edited by pipesportugal : 06-08-2008 at 02:36 PM.
I'm not so much an experienced colleague as more of a rat bastard novice, but it sounds like you may want to check out Dreamweaver. I don't know if Zend does that, but I know for a fact DW does, and all you have to do is select the lines you want 'compressed' and click in the gutter. Honestly though I hardly ever use it myself, but then most of the classes I'm working with in my current project are only 2-400 lines in length, and I've found documenting phpDoc style has really helped with the organization.