tableHtml = $tableHtml; $this->scriptOptions = $scriptOptions; } /** * @return string */ public function getResult() { return $this->getHtml(); } /** * @return string */ public function getHtml() { $html = '
'; $html .= $this->getTableHtml(); $html .= $this->getScriptHtml(); $html .= '
'; return $html; } /** * @return string */ public function getTableHtml() { return $this->tableHtml; } /** * @return string */ public function getScriptHtml() { $optionsJsonString = json_encode( $this->getScriptOptions(), JSON_HEX_TAG | JSON_HEX_APOS | JSON_HEX_AMP | JSON_HEX_QUOT ); return sprintf('', $optionsJsonString); } /** * @return array */ public function getScriptOptions() { return $this->scriptOptions; } /** * @return string */ public function __toString() { return $this->getHtml(); } }