@@ -180,4 +180,66 @@ class Services extends BaseService
|
||||
$http = static::curlrequest($options);
|
||||
return new \App\Services\ApiClient($http, $apiConfig);
|
||||
}
|
||||
|
||||
public static function schoolYearContext(bool $getShared = true): \App\Services\SchoolYearContextService
|
||||
{
|
||||
if ($getShared) {
|
||||
return static::getSharedInstance('schoolYearContext');
|
||||
}
|
||||
|
||||
return new \App\Services\SchoolYearContextService(
|
||||
model(\App\Models\SchoolYearModel::class)
|
||||
);
|
||||
}
|
||||
|
||||
public static function schoolYearWriteGuard(bool $getShared = true): \App\Services\SchoolYearWriteGuard
|
||||
{
|
||||
if ($getShared) {
|
||||
return static::getSharedInstance('schoolYearWriteGuard');
|
||||
}
|
||||
|
||||
return new \App\Services\SchoolYearWriteGuard();
|
||||
}
|
||||
|
||||
public static function schoolYearValidation(bool $getShared = true): \App\Services\SchoolYearValidationService
|
||||
{
|
||||
if ($getShared) {
|
||||
return static::getSharedInstance('schoolYearValidation');
|
||||
}
|
||||
|
||||
return new \App\Services\SchoolYearValidationService(
|
||||
model(\App\Models\SchoolYearModel::class)
|
||||
);
|
||||
}
|
||||
|
||||
public static function schoolYearManagement(bool $getShared = true): \App\Services\SchoolYearManagementService
|
||||
{
|
||||
if ($getShared) {
|
||||
return static::getSharedInstance('schoolYearManagement');
|
||||
}
|
||||
|
||||
return new \App\Services\SchoolYearManagementService(
|
||||
model(\App\Models\SchoolYearModel::class),
|
||||
model(\App\Models\ConfigurationModel::class),
|
||||
model(\App\Models\SchoolYearTransitionLogModel::class),
|
||||
model(\App\Models\SchoolYearClosingBatchModel::class),
|
||||
static::schoolYearValidation(),
|
||||
\Config\Database::connect()
|
||||
);
|
||||
}
|
||||
|
||||
public static function schoolYearClosing(bool $getShared = true): \App\Services\SchoolYearClosingService
|
||||
{
|
||||
if ($getShared) {
|
||||
return static::getSharedInstance('schoolYearClosing');
|
||||
}
|
||||
|
||||
return new \App\Services\SchoolYearClosingService(
|
||||
model(\App\Models\SchoolYearModel::class),
|
||||
model(\App\Models\SchoolYearClosingBatchModel::class),
|
||||
model(\App\Models\SchoolYearClosingItemModel::class),
|
||||
static::schoolYearManagement(),
|
||||
\Config\Database::connect()
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user