mirror of
https://github.com/NNTmux/newznab-tmux.git
synced 2026-08-28 17:01:16 +00:00
Add TVProcessing facade and service provider
This commit is contained in:
@@ -0,0 +1,27 @@
|
||||
<?php
|
||||
|
||||
namespace App\Facades;
|
||||
|
||||
use App\Services\TvProcessing\TvProcessingPipeline;
|
||||
use Illuminate\Support\Facades\Facade;
|
||||
|
||||
/**
|
||||
* @method static array processRelease(array|object $release, bool $debug = false)
|
||||
* @method static void process(string $groupID = '', string $guidChar = '', int|string|null $processTV = '')
|
||||
* @method static TvProcessingPipeline addPipe(\App\Services\TvProcessing\Pipes\AbstractTvProviderPipe $pipe)
|
||||
* @method static \Illuminate\Support\Collection getPipes()
|
||||
* @method static array getStats()
|
||||
*
|
||||
* @see \App\Services\TvProcessing\TvProcessingPipeline
|
||||
*/
|
||||
class TvProcessing extends Facade
|
||||
{
|
||||
/**
|
||||
* Get the registered name of the component.
|
||||
*/
|
||||
protected static function getFacadeAccessor(): string
|
||||
{
|
||||
return TvProcessingPipeline::class;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,30 @@
|
||||
<?php
|
||||
|
||||
namespace App\Providers;
|
||||
|
||||
use App\Services\TvProcessing\TvProcessingPipeline;
|
||||
use Illuminate\Support\ServiceProvider;
|
||||
|
||||
class TvProcessingServiceProvider extends ServiceProvider
|
||||
{
|
||||
/**
|
||||
* Register services.
|
||||
*/
|
||||
public function register(): void
|
||||
{
|
||||
$this->app->singleton(TvProcessingPipeline::class, function ($app) {
|
||||
return TvProcessingPipeline::createDefault();
|
||||
});
|
||||
|
||||
$this->app->alias(TvProcessingPipeline::class, 'tv-processing');
|
||||
}
|
||||
|
||||
/**
|
||||
* Bootstrap services.
|
||||
*/
|
||||
public function boot(): void
|
||||
{
|
||||
//
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user