0
Invoice 클래스 생성 메서드에서 FPDF Construct 클래스를 호출하려고합니다. Invoice 클래스에 FPDF cass의 생성 방법을 어떻게 호출 할 수 있습니까?다른 클래스 생성 메서드를 생성 메서드에 호출하는 방법은 무엇입니까?
송장 클래스 :
public function __construct($size='A4',$currency='$',$language='en') {
$this->columns = 4;
$this->items = array();
$this->totals = array();
$this->addText = array();
$this->firstColumnWidth = 70;
$this->currency = $currency;
$this->maxImageDimensions = array(230,130);
$this->setLanguage($language);
$this->setDocumentSize($size);
$this->setColor("#222222");
<!-- I want to call here fpdf construct class -->
$this->FPDF('P','mm',array($this->document['w'],$this->document['h']));
$this->AliasNbPages();
$this->SetMargins($this->margins['l'],$this->margins['t'],$this->margins['r']);
}
FPDF 클래스 :
function __construct($orientation='P', $unit='mm', $size='A4')
{
// Some checks
$this->_dochecks();
// Initialization of properties
$this->state = 0;
$this->page = 0;
$this->n = 2;
$this->buffer = '';
$this->SetCompression(true);
// Set default PDF version number
$this->PDFVersion = '1.3';
}