public function getApi() { if (empty($this->_mpdf) || !$this->_mpdf instanceof mPDF) { $this->setApi(); } return $this->_mpdf; }