/** * Construtor da Classe * * @param string $driver * @param Zend_Db_Mapper $mapperView * @param string $title */ public function __construct($driver, $mapperView, $options) { $this->_options = $options; if (!isset($this->_options['log'])) { $this->_options['log'] = true; } if ($driver == '') { $driver = 'PDF'; } $this->_report = ZendT_Report::factory($driver, $options); $this->_report->setTitle($options['title']['value']); $this->_report->addPage(); $this->_mapper = $mapperView; $this->_columns = $this->_mapper->getColumns()->toArray(); $this->_fontSize = $options['fontSize']; if (!$this->_fontSize) { $this->_fontSize = 7; } if ($this->_options['log']) { $this->_log = new ZendT_Log_Report(get_class($this->_mapper), $options['title']['value']); } $this->_total = array(); $this->_type = array(); $this->_styleRow = false; if (method_exists($mapperView, 'getStylesRow')) { $this->_styleRow = true; } $this->_driver = $driver; }
/** * @param string $title * @return ZendT_Report_Pdf */ public function setTitle($title) { $this->_title['value'] = $title; parent::setTitle($this->_title); return $this; }
/** * @param string $title * @return ZendT_Report_Pdf */ public function setTitle($title) { $this->_title['value'] = utf8_decode($title); parent::setTitle($this->_title); $this->_driver->setTitulo($this->_title); return $this; }