em = \Utility\Registry::getEntityManager(); $this->_input = $input; $this->_options = $options; is_array($data) && $this->_data = $data; $this->build(); return $this; } /** * Build the dataset. */ public function build() {} /* ---------------------------------------------------------------------- *\ * Specifically cater for Excel Report requirements. \* ---------------------------------------------------------------------- */ /** * Retrieve report title. * @return string */ public function getTitle() { return $this->_title; } /** * Retrieve report subject. * @return string */ public function getSubject() { return $this->_subject; } /** * Retrieve report description. * @return string */ public function getDescription() { return $this->_description; } /** * Retrieve report format. * @return string */ public function getFormat() { return $this->_format; } /** * Retrieve queries to display at beginning of report. * @return array */ public function getQueries() { return $this->_queries; } /** * Retrieve report column headers. * @return array */ public function getHeaders() { return $this->_headers; } /** * Retrieve report fields. * @return array */ public function getFields() { return $this->_fields; } /** * Retrieve report fields to receive total value at end of report. * @return array */ public function getTotalFields() { return $this->_totals; } /** * Retrieve report fields to receive currency formatting. * @return array */ public function getCurrencyFields() { return $this->_currencyFields; } /** * Retrieve notes to be added to end of report. * @return array */ public function getNotes() { return $this->_notes; } /** * Retrieve chart specifications. * @return array */ public function getChart() { return $this->_chart; } /** * Retrieve report data. * @return array */ public function getData() { return $this->_data; } /** * Retrieve report data. * @return array */ public function getDataIntersection() { $fields = array_flip($this->_fields); foreach ($this->_data as $id => $row) { $this->_data[$id] = array_intersect_key($row, $fields); } return $this->_data; } }