ro
f8005aa60d
ported over the backup functionality from the old build to the new while making few tweaks instead of packaging up all files in the site to create massive zip files, now a list of files is created for the user and blog directories that the system will use to download and put them in the appropriate directories, resulting in a such slimmer backup file. archiving images my be added at a later date, but will be kept seperate from the current back up process
99 lines
3.1 KiB
PHP
99 lines
3.1 KiB
PHP
<?php
|
|
|
|
namespace App\Providers;
|
|
|
|
use Illuminate\Support\ServiceProvider;
|
|
use App\Repositories\PageRepository;
|
|
use App\Interfaces\PageRepositoryInterface;
|
|
use App\Services\SettingsService;
|
|
use App\Services\AuthService;
|
|
use App\Services\ContentService;
|
|
use App\Services\PaginateService;
|
|
use App\Services\ThemeService;
|
|
use App\Services\DocService;
|
|
use App\Services\FileUploadService;
|
|
use App\Services\RenderService;
|
|
use App\Services\SortingService;
|
|
use App\Services\AssetService;
|
|
use App\Services\MaintenanceService;
|
|
|
|
class FipamoServiceProvider extends ServiceProvider
|
|
{
|
|
/**
|
|
* Register services.
|
|
*/
|
|
public function register(): void
|
|
{
|
|
//services
|
|
$this->app->bind(SettingsService::class, function ($app) {
|
|
return new SettingsService(new DocService(), new ContentService());
|
|
});
|
|
|
|
$this->app->bind(AuthService::class, function ($app) {
|
|
return new AuthService(new SettingsService(new DocService(), new ContentService()));
|
|
});
|
|
|
|
$this->app->bind(ContentService::class, function ($app) {
|
|
return new ContentService();
|
|
});
|
|
|
|
$this->app->bind(ThemeService::class, function ($app) {
|
|
return new ThemeService(new SettingsService(new DocService(), new ContentService()));
|
|
});
|
|
|
|
$this->app->bind(PaginateService::class, function ($app) {
|
|
return new PaginateService(new ContentService());
|
|
});
|
|
|
|
$this->app->bind(DocService::class, function ($app) {
|
|
return new DocService();
|
|
});
|
|
|
|
$this->app->bind(FileUploadService::class, function ($app) {
|
|
return new FileUploadService();
|
|
});
|
|
|
|
$this->app->bind(RenderService::class, function ($app) {
|
|
return new RenderService(
|
|
new SortingService(
|
|
new SettingsService(new DocService(), new ContentService()),
|
|
new ContentService(),
|
|
new ThemeService(new SettingsService(new DocService(), new ContentService()))
|
|
),
|
|
new SettingsService(new DocService(), new ContentService()),
|
|
new ContentService(),
|
|
);
|
|
});
|
|
|
|
$this->app->bind(SortingService::class, function ($app) {
|
|
return new SortingService(
|
|
new SettingsService(new DocService(), new ContentService()),
|
|
new ContentService(),
|
|
new ThemeService(new SettingsService(new DocService(), new ContentService()))
|
|
);
|
|
});
|
|
|
|
$this->app->bind(AssetService::class, function ($app) {
|
|
return new AssetService(
|
|
new ThemeService(
|
|
new SettingsService(new DocService(), new ContentService())
|
|
)
|
|
);
|
|
});
|
|
|
|
$this->app->bind(MaintenanceService::class, function ($app) {
|
|
return new MaintenanceService(
|
|
new SettingsService(new DocService(), new ContentService())
|
|
);
|
|
});
|
|
}
|
|
|
|
/**
|
|
* Bootstrap services.
|
|
*/
|
|
public function boot(): void
|
|
{
|
|
$this->app->bind(PageRepositoryInterface::class, PageRepository::class);
|
|
}
|
|
}
|