dbPool = $dbPool; } /** * Get all staff members. * * This function gets all accounts in a range * * @param array $filter Filter for search results * @param int $offset Offset for first account * @param int $limit Limit for results * * @return array * * @since 1.0.0 */ public function getList($filter = null, $offset = 0, $limit = 100) { $result = null; switch ($this->dbPool->get()->getType()) { case DatabaseType::MYSQL: $search = $this->dbPool->get()->generate_sql_filter($filter, true); $sth = $this->dbPool->get()->con->prepare('SELECT `' . $this->dbPool->get()->prefix . 'hr_staff`.* FROM `' . $this->dbPool->get()->prefix . 'hr_staff` ' . $search . 'LIMIT ' . $offset . ',' . $limit); $sth->execute(); $result['list'] = $sth->fetchAll(); $sth = $this->dbPool->get()->con->prepare('SELECT FOUND_ROWS();'); $sth->execute(); $result['count'] = $sth->fetchAll()[0][0]; break; } return $result; } /** * Get task stats. * * @return array * * @since 1.0.0 */ public function getStats() { } }