Code Coverage |
||||||||||
Classes and Traits |
Functions and Methods |
Lines |
||||||||
| Total | |
0.00% |
0 / 1 |
|
0.00% |
0 / 4 |
CRAP | |
0.00% |
0 / 24 |
| LectureHourService | |
0.00% |
0 / 1 |
|
0.00% |
0 / 4 |
42.00 | |
0.00% |
0 / 24 |
| __construct | |
0.00% |
0 / 1 |
2.00 | |
0.00% |
0 / 2 |
|||
| __clone | |
0.00% |
0 / 1 |
2.00 | |
0.00% |
0 / 2 |
|||
| getInstance | |
0.00% |
0 / 1 |
6.00 | |
0.00% |
0 / 5 |
|||
| getAllLectureHours | |
0.00% |
0 / 1 |
6.00 | |
0.00% |
0 / 15 |
|||
| <?php | |
| namespace com\linways\core\ams\professional\service; | |
| use com\linways\core\ams\professional\exception\ProfessionalException; | |
| use com\linways\core\ams\professional\service\productConfiguration\MenuTemplateInheritService; | |
| /** | |
| * | |
| * @Date 27/10/20 | |
| */ | |
| class LectureHourService extends BaseService | |
| { | |
| /** | |
| * @var null | |
| */ | |
| private static $_instance = null; | |
| /** | |
| * LectureHourService constructor. | |
| */ | |
| private function __construct() | |
| { | |
| } | |
| /** | |
| * prevent cloning | |
| */ | |
| private function __clone() | |
| { | |
| } | |
| /** | |
| * @return LectureHourService|null | |
| */ | |
| public static function getInstance() | |
| { | |
| if (!is_object(self::$_instance)) | |
| self::$_instance = new self(); | |
| return self::$_instance; | |
| } | |
| /** | |
| * @return Object|array | |
| * @throws ProfessionalException | |
| */ | |
| public function getAllLectureHours() | |
| { | |
| $sql = "SELECT | |
| id, | |
| name, | |
| `order` as priority | |
| FROM | |
| timetable_hour | |
| ORDER BY | |
| `order`"; | |
| try { | |
| return $this->executeQueryForList($sql); | |
| } catch (\Exception $e) { | |
| throw new ProfessionalException($e->getCode(), $e->getMessage()); | |
| } | |
| } | |
| } |