public $perm = DBQ_PERM;
public $run = false;
+ public $sep = ' / ';
public $title = DBQ_TITLE;
const PARAM_ARGS_SEP = '|';
const PARAM_EXP = '[\w\._:-]{2,100}';
const PARAM_DB_DEFAULT = DBQ_PARAM_DEFAULT;
+ public $formats = [
+ 'table',
+ 'csv',
+ 'json',
+ 'yaml',
+ 'sh',
+ ];
+
public $params = [
'format' => DBQ_PARAM_FORMAT,
'db' => self::PARAM_DB_DEFAULT,
// Page
require_once(NB_ROOT.'/lib/php/page.php');
- list($title,$nav) = $this->title_nav();
-
$this->page = new Page([
'css' => $this->css,
- 'title' => join(', ',$title),
- 'nav' => $nav,
- 'sep' => ', ',
+ 'sep' => $this->sep,
]);
if ($this->run) $this->run();
// Post defaults values
if (empty($this->ext)) $this->ext = $format;
+ list($title,$nav) = $this->title_nav();
+ $this->page->title = join($this->sep,$title);
+ $this->page->nav = $nav;
+
if ($format == 'html') $format = 'table';
$this->params['format'] = $format;
- $this->db->formats = [
- 'table',
- 'csv',
- 'json',
- 'yaml',
- 'sh',
- ];
+ $this->db->formats = $this->formats;
$this->db->format = $format;
// Then content type