 |
 | object-mapping (something I never ever saw :) ) |  |
Joined: 14 Mar 2007 |
Posts: 4 |
Location: Szeged, Hungary |
|
 |
Posted: Tue Mar 13, 2007 7:44 am |
|
 |
 |
 |
 |
Hi!
I have a new feature for You to make me...
I have problems with the autocomplete feature: it is not working for dinamically created objects. I know: the IDE won't understand the working-structure of my program, but if I could make it know...
For example:
I have a loadModule method and by calling that with a module name it includes the PHP-file of the module class and make a new object from it. This is what the IDE won't guess ever. But if I could map the $dblayer variable as class dblayer, than it could show the dblayer class's properties and methods to autocomplete what I typed so far.
I think it would be a huge help for those, who use a certain variable with a certain object type and load them from the code depending on the parameters/situation.
Also: this would be a step forward to PHP5, because PHP5 have an __autoload() function which is going to be called every case that the script would like to make a new object from a class that does not exists and so with this feature the automatic loading is more easily can be done, not like in php4... )
I hope I was clear enough 
|
|
 |
 | |  |
Joined: 14 Mar 2007 |
Posts: 4 |
Location: Szeged, Hungary |
|
 |
Posted: Tue Mar 13, 2007 8:47 am |
|
 |
 |
 |
 |
That's a good hint, thank you. But please note that in this case it cannot solve my problem.
My objects are included and construct on the fly, I don't know when I use them. And the biggest problem: I have an index.php that has 1 include() and after that when initializing it dinamically loads any needed files. And because of this method I if I'm editing the mod_guestbook/classes/guestbook.php file, inside that I have no include or require on anything, because it is not needed. So I have to do the typehinting for all my PHP files...
Or maybe I must have misunderstood something or blind not to catch up Your idea...
Thanks!
|
|
 |
 | |  |
 |
 | |  |
Joined: 07 Mar 2007 |
Posts: 44 |
Location: Lithuania |
|
 |
Posted: Fri Mar 16, 2007 6:36 am |
|
 |
 |
 |
 |
Oh, btw, dmitri,
as you mentioned, phpEd scans project tree for all php files, to find apropriate class for object, etc. But, I have situation, where in the same project but diferrent deep levels or dramaticaly different directories, there are some files with the same class name defined, but whole diferrent code inside. "Why?" you'd say, lets take example, that the same project has admin and client sides, so every side needs for my case diferrent class'es, as phpEd goes trought my project filelist only first class is defined, and clientside classes are left out of sign.
How could I solve this problem without renaming class names?
Bye 
|
|
 |
 | |  |
Joined: 07 Mar 2007 |
Posts: 44 |
Location: Lithuania |
|
 |
Posted: Sun Mar 18, 2007 11:40 am |
|
 |
 |
 |
 |
You see, dmitri, it's possible, of couse, but a bit annoying  . Because, logically it's the same project, not two different  .
In my opinion this is optional feauture, but the good one  .
Bye
|
|
Joined: 07 Mar 2007 |
Posts: 44 |
Location: Lithuania |
|
 |
Posted: Sun Mar 18, 2007 4:19 pm |
|
 |
 |
 |
 |
Imagine situation:
admin site (/admin directory) has libraries (classes) in it, where template, session handler and other classes sits, class names 'template', 'session', 'page' etc.
client side (/client directory) has the same class names, but whole diferrent logic inside, why should I rename class names for every x-side...
The point in this is - admin and client side +- has almost the same logic, but libraries part for both sides for my situation has to have same method, class names, but different logic inside with several unique methods etc..
So there comes phpEd class name overrides, that are very annoying.
Bye
|
|
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 vote in polls in this forum
|
All times are GMT - 5 Hours
Page 1 of 1
|
|
|
|  |