public function getAll($table = false, $where = array(), $fields = array(), $returnType = false)
{
if (!$table) {
$result = $this->results($this->command());
$this->returnType = 'object';
return $result;
}
if ($returnType) {
$this->returnType = $returnType;
}
$column = '*';
if (!empty($fields)) {
$column = $fields;
}
$this->select($column)->from($table);
if (!empty($where)) {
foreach ($where as $key => $val) {
$this->where($key, '=', $val, 'AND');
}
}
return $this->getAll();
}