/** *Try to instantiate display object * @param string $display * @param string $view * @returns mixed. false on failure I2CE_CustomReport_Display on succcess */ public function instantiateDisplay($display, $view) { if (!$this->view) { I2CE::raiseErorr("No view"); return false; } if (!$this->display_obj instanceof I2CE_CustomReport_Display_mHero) { try { $this->display_obj = new I2CE_CustomReport_Display_mHero($this, $this->view); } catch (Exception $e) { $msg = $e->getMessage(); I2CE::raiseError($msg); $this->userMessage($msg); $this->display_obj = false; } if (!$this->display_obj instanceof I2CE_CustomReport_Display) { $this->display_obj = false; } } return $this->display_obj; }