• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
CI and fpdf/fpdi

Yesterday I got Fpdf and Fpdi working within the CI framework.

Currently to access the classes I am doing this.


//now do something with them

My question is how to make multiple instances? Outside of CI i would do it like this

$pdf1 = new fpdi();

$pdf2 = new fpdi();

Do I need make two seperate models? or what?

Thanks in advance.


The third parameter in load in loading a library is used to assign the class to a different name.

It's in the userguide:
Quote:Assigning a Library to a different object name

If the third (optional) parameter is blank, the library will usually be assigned to an object with the same name as the library. For example, if the library is named Session, it will be assigned to a variable named $this->session.

If you prefer to set your own class names you can pass its value to the third parameter


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  

Users browsing this thread:
1 Guest(s)

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