"table table-bordered", "border" => "1"] : $meta['params']; if ($meta) { $this->informationArray = [ "meta" => [ "columns" => $meta['columns'] ?? [], "rows" => $meta['rows'] ?? [], "perPage" => $meta['perPage'] ?? 10, "currentPage" => $meta['currentPage'] ?? 1, "baseUrl" => $meta['baseUrl'] ?? '', "actions" => $meta['actions'] ?? '', "params" => $params ], "data" => $data ?? [] ]; } } /** * @param array $infArr * @return string|null */ protected function toJson(array $infArr): ?string { if ($infArr) return json_encode($infArr, JSON_PRETTY_PRINT | JSON_UNESCAPED_UNICODE); return null; } /** * @return string|null */ public function getJson(): ?string { return $this->toJson($this->informationArray); } }