public function __construct($config)
{
$this->config = $config;
if (empty($this->config['table'])) {
throw new \Ip\Exception('\'table\' configuration value missing.');
}
if (empty($this->config['pageSize'])) {
$this->config['pageSize'] = 20;
}
if (empty($this->config['pagerSize'])) {
$this->config['pagerSize'] = 10;
}
if (!isset($this->config['fields']) || !is_array($this->config['fields'])) {
$this->config['fields'] = $this->getTableFields($this->tableName(), $this->languageTableName());
}
$this->checkConfig($this->config);
}