dbmsv4/app/Config/Services.php
2025-11-18 18:06:17 +09:00

151 lines
4.5 KiB
PHP

<?php
namespace Config;
use App\Services\Auth\GoogleService;
use App\Services\Auth\LocalService;
use App\Services\CollectorService;
use App\Services\Customer\AccountService;
use App\Services\Customer\ClientService;
use App\Services\Customer\CouponService;
use App\Services\Customer\PointService;
use App\Services\MylogService;
use App\Services\PaymentService;
use App\Services\TrafficService;
use App\Services\UserService;
use CodeIgniter\Config\BaseService;
/**
* Services Configuration file.
*
* Services are simply other classes/libraries that the system uses
* to do its job. This is used by CodeIgniter to allow the core of the
* framework to be swapped out easily without affecting the usage within
* the rest of your application.
*
* This file holds any application-specific services, or service overrides
* that you might need. An example has been included with the general
* method format you should use for your service methods. For more examples,
* see the core Services file at system/Config/Services.php.
*/
class Services extends BaseService
{
/*
* public static function example($getShared = true)
* {
* if ($getShared) {
* return static::getSharedInstance('example');
* }
*
* return new \CodeIgniter\Example();
* }
*/
//로그인정보요
public static function myauth($getShared = true): LocalService
{
if ($getShared) {
return static::getSharedInstance(__FUNCTION__);
} else {
return new LocalService(
new \App\Models\UserModel()
);
}
}
//로그인처리용
public static function localauth($getShared = true): LocalService
{
if ($getShared) {
return static::getSharedInstance(__FUNCTION__);
} else {
return new LocalService(
new \App\Models\UserModel()
);
}
}
public static function googleauth($getShared = true): GoogleService
{
if ($getShared) {
return static::getSharedInstance(__FUNCTION__);
}
return new GoogleService(
new \App\Models\USerModel(),
new \App\Libraries\MySocket\GoogleSocket\CURL()
);
}
//로그인처리용
public static function userservice($getShared = true): UserService
{
if ($getShared) {
return static::getSharedInstance(__FUNCTION__);
}
return new UserService(
new \App\Models\USerModel()
);
}
public static function mylogservice($getShared = true): MylogService
{
if ($getShared) {
return static::getSharedInstance(__FUNCTION__);
}
return new MylogService(
new \App\Models\MylogModel(),
);
}
public static function paymentservice($getShared = true): PaymentService
{
if ($getShared) {
return static::getSharedInstance(__FUNCTION__);
}
return new PaymentService(
new \App\Models\PaymentModel(),
);
}
//Customer
public static function customer_clientservice($getShared = true): ClientService
{
if ($getShared) {
return static::getSharedInstance(__FUNCTION__);
}
return new ClientService(
new \App\Models\Customer\ClientModel(),
);
}
public static function customer_accountservice($getShared = true): AccountService
{
if ($getShared) {
return static::getSharedInstance(__FUNCTION__);
}
return new AccountService(
new \App\Models\Customer\AccountModel(),
);
}
public static function customer_coupontservice($getShared = true): CouponService
{
if ($getShared) {
return static::getSharedInstance(__FUNCTION__);
}
return new CouponService(
new \App\Models\Customer\CouponModel(),
);
}
public static function customer_pointservice($getShared = true): PointService
{
if ($getShared) {
return static::getSharedInstance(__FUNCTION__);
}
return new PointService(
new \App\Models\Customer\PointModel(),
);
}
//Equipment
public static function equipment_lineservice($getShared = true): LineService
{
if ($getShared) {
return static::getSharedInstance(__FUNCTION__);
}
return new LineService(
new \App\Models\Equipment\LineModel(),
);
}
}