Hi all,
I know this is probably not the best place to post this message and although I have searched I have been unsuccessful in finding an answer.
I’ve been coding a small program and using modX as my CMS core. My problem is how to create a class that use to other files containing classes and reference them accordingly.
For instance, my program contains the following files:
ncr.php
data.php
file.php
my main class is called through a snippet:
$complaint = new NCR();
return $complaint->Run();
I then make a connection to the other two files using require_once and $this->db and $this->fl.
My problem is when adding functions inside the data class I dont seem to be able to call functions contained within the file class.
I find my code works but is rather embarassing to look over. Am I missing something fundamental in trying to call a function in this manor?
I’m thinking I should be able to call it from the main ncr class downward but alas it just aint so.
I’m lost if anyone could help I would really appreciate it.
Thanks,
BBloke