Jump to content

[SOLVED] New class can't be created


MrBaseball34

Recommended Posts

I created a new class for building my downloadable reports.
When I instantiated it in OrderHistory, nothing was happening.
I have emptied out the class so all it contains is the definition and the constructor and it STILL cannot
be instantiated.
[How I'm calling it in OrderHistory:

 Tools::DebugLog('OrderHistory', 'Before new ReportGenerator()');
 $rg = new ReportGenerator();
 Tools::DebugLog('OrderHistory', 'After new ReportGenerator()');


DebugLog is a new function I wrote in the Tools class that logs the messages to a table called ps_debug_table.

Here is my class code:

class  ReportGenerator extends ObjectModel
{
 public function __construct()
 {
   parent::__construct(); 
 }
} // class    ReportGenerator extends ObjectModel



It logs the 'Before new ReportGenerator()' message but never logs the 'After new ReportGenerator()' message.
I intend to have an instance of TCPDF in this class as it is supposed to build a PDF report. I will also be having
two properties, partno and physical_filename.

I was thinking that, when I had that stuff in the class, it was what was causing the problem. But now that I
have a simple stripped class and it STILL isn't working. there's something major here...

Any ideas?

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...