You are viewing this forum as a guest. Login to an existing account, or create a new account, to reply to topics and to create new topics.
Just a question out of technical interest- I am trying to get a hanlde on how all the classes that lie at the core of ECP work. (so when I make my own mods I implement them better than simply adding functions to classes or bodging things) SO I really want to understand how classes are called into use. I don't see much inthe way of includes and I don't see __autoload() anywhere.
I have been looking though the index.php file- as this is fundamentally the file thats run initially on any access to the shop.
Forgive me if I am being a bit dim, but how on earth does this connect to the Core classes?
There is a class inside this file called KHXCmain. I run it through Reflection and can see basically what most of it does, but I am obviously missing something.
On line 303 it does this
$privpath = $this->globals('khxc.path_private'); if (@file_exists($privpath . '/core/KHXC/KHXC.php')) { include_once($privpath . '/core/KHXC/KHXC.php'); // +-- // | If there is a problem finding the file, we error out. // +-- } else { ................ } // End of if statement.
These files don't exist in my installation that I can see.
So
a) why does it not error
b) How does it get to {privpath}/core/CORE/CORE.php
I can't work this out, been wracking my brains for hours- obviously they must be pretty dense!
Please someone put me out my misery- is there some neat trick at play or have I just missed something basic like an include I can't see for looking?
Offline
You're looking at the index file for version 6. If you look at the index for version 7 you will see, at line 342, the instantiation of the core:
$core =& new CORE($xglobal_cache);
Also keep in mind that CCP will work with PHP 4 so it's not truly and strictly OO in the PHP 5 OO sense so you won't see true OO construct as you might expect.
Offline
I should also mention that the absolute best method for seeing the calling sequence is to enable debug to the browser.
Offline
Duh! How on earth did I do that!
I know what i have done!
I copied down the private files from the private area to my local drive so I have all these but when I got the new front end , though i thought I had copied it all accross locally- I obviously never copied the index file. Until now I have had no reason to go near the index.php file- was only looking at it out of interest and it never struck me that the one I had was the old one- obviously I knew the version was the v 6 one but thought it was somethign to do withthe way the upgrade had been implemented. what a f@ckwit I am!
duh duh duh.
Lucky I never sent the index file sitting on my drive to the site or I would have been in a world of hurt.
duh!
I have been playing withthe debugger but wasn't seeing what I ws expecting- maybe not going far enoough through it obviously when i am sitting here trying to relate the code I could see to the version I was running it wasn't lining up
duh again!
K
Offline