Kryptronic Software Support Forum

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.

#1 12-01-2009 16:39:23

Tanushiheadbash
Member
From: Stirling, Scotland
Registered: 07-20-2009
Posts: 82

Shop start up classes

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

Code:

$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

 

#2 12-01-2009 17:08:56

Dave
Member
Registered: 07-05-2003
Posts: 11233

Re: Shop start up classes

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:

Code:

$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

 

#3 12-01-2009 17:11:28

Dave
Member
Registered: 07-05-2003
Posts: 11233

Re: Shop start up classes

I should also mention that the absolute best method for seeing the calling sequence is to enable debug to the browser.

Offline

 

#4 12-01-2009 17:16:49

dh783
Member
From: Avondale, Arizona
Registered: 04-06-2005
Posts: 6233
Website

Re: Shop start up classes

Are you sure that your looking at the right index.php files? It sounds like your looking at the ccp6 index.php.

John

Offline

 

#5 12-01-2009 17:42:25

Tanushiheadbash
Member
From: Stirling, Scotland
Registered: 07-20-2009
Posts: 82

Re: Shop start up classes

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

 

Board footer