• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How to call a function from a function in the same class?

Struggling with this and any help is appreciated. Here's the code:

I am extending the tcpdf class to use a custom header and footer.

class Mypdf extends TCPDF

In this class I have the following:

public function newpdf($title, $subject, $report_name)
public function body_project_listing()

The first function sets up the pdf report and the second function hits the database and gets the info for the body of the report. I am trying to call body_project_listing from within newpdf by $this->body_project_listing and keep getting Fatal error: Call to undefined method Mypdf::project_body_listing() in Mypdf.php on line 116.

Line 116 is $this->project_body_listing();


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  

  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2021 MyBB Group.