From 234da463ef375b66d532910bb8420c8cef6f2a1f Mon Sep 17 00:00:00 2001 From: Dennis Eichhorn Date: Fri, 6 May 2016 18:24:44 +0200 Subject: [PATCH] Reformatting and new directory (capitalization) --- Models/DepartmentList.php | 107 -------------------------------------- 1 file changed, 107 deletions(-) delete mode 100644 Models/DepartmentList.php diff --git a/Models/DepartmentList.php b/Models/DepartmentList.php deleted file mode 100644 index b42d588..0000000 --- a/Models/DepartmentList.php +++ /dev/null @@ -1,107 +0,0 @@ - - * @author Dennis Eichhorn - * @copyright 2013 Dennis Eichhorn - * @license OMS License 1.0 - * @version 1.0.0 - * @link http://orange-management.com - */ -namespace Modules\HumanResources\Models; - -use phpOMS\DataStorage\Database\DatabaseType; - -/** - * Department list class. - * - * @category Modules - * @package HumanResources - * @author OMS Development Team - * @author Dennis Eichhorn - * @license OMS License 1.0 - * @link http://orange-management.com - * @since 1.0.0 - */ -class DepartmentList -{ - - /** - * Database instance. - * - * @var \phpOMS\DataStorage\Database\Database - * @since 1.0.0 - */ - private $dbPool = null; - - /** - * Constructor. - * - * @param \phpOMS\DataStorage\Database\Pool $dbPool Database pool instance - * - * @since 1.0.0 - * @author Dennis Eichhorn - */ - public function __construct($dbPool) - { - $this->dbPool = $dbPool; - } - - /** - * Get all departments. - * - * 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 - * @author Dennis Eichhorn - */ - public function getList($filter = null, $offset = 0, $limit = 100) - { - $result = null; - - switch ($this->dbPool->get('core')->getType()) { - case DatabaseType::MYSQL: - $search = $this->dbPool->get('core')->generate_sql_filter($filter, true); - - $sth = $this->dbPool->get('core')->con->prepare('SELECT - `' . $this->dbPool->get('core')->prefix . 'hr_department`.* - FROM - `' . $this->dbPool->get('core')->prefix . 'hr_department` ' - . $search . 'LIMIT ' . $offset . ',' . $limit); - $sth->execute(); - - $result['list'] = $sth->fetchAll(); - - $sth = $this->dbPool->get('core')->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 - * @author Dennis Eichhorn - */ - public function getStats() - { - } -}