Code Coverage |
||||||||||
Classes and Traits |
Functions and Methods |
Lines |
||||||||
Total | |
0.00% |
0 / 1 |
|
0.00% |
0 / 4 |
CRAP | |
0.00% |
0 / 17 |
ModeOfInstructionsService | |
0.00% |
0 / 1 |
|
0.00% |
0 / 4 |
42.00 | |
0.00% |
0 / 17 |
__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 |
|||
getAllModeOfInstructions | |
0.00% |
0 / 1 |
6.00 | |
0.00% |
0 / 8 |
<?php | |
namespace com\linways\core\ams\professional\service; | |
use com\linways\core\ams\professional\exception\ProfessionalException; | |
/** | |
* | |
* @Date 27/10/20 | |
*/ | |
class ModeOfInstructionsService extends BaseService | |
{ | |
/** | |
* @var null | |
*/ | |
private static $_instance = null; | |
/** | |
* LectureHourService constructor. | |
*/ | |
private function __construct() | |
{ | |
} | |
/** | |
* prevent cloning | |
*/ | |
private function __clone() | |
{ | |
} | |
/** | |
* @return ModeOfInstructionsService|null | |
*/ | |
public static function getInstance() | |
{ | |
if (!is_object(self::$_instance)) | |
self::$_instance = new self(); | |
return self::$_instance; | |
} | |
/** | |
* @return Object|array | |
* @throws ProfessionalException | |
*/ | |
public function getAllModeOfInstructions() | |
{ | |
$sql = "SELECT id,name,code FROM mode_of_instructions WHERE is_active=1"; | |
try { | |
return $this->executeQueryForList($sql); | |
} catch (\Exception $e) { | |
throw new ProfessionalException($e->getCode(), $e->getMessage()); | |
} | |
} | |
} |