Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[10.x] Adding Pipeline Facade #46271

Merged
merged 5 commits into from
Mar 3, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion src/Illuminate/Pipeline/PipelineServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,11 @@ class PipelineServiceProvider extends ServiceProvider implements DeferrableProvi
public function register()
{
$this->app->singleton(
PipelineHubContract::class, Hub::class
PipelineHubContract::class,
Hub::class
);

$this->app->bind('pipeline', fn ($app) => new Pipeline($app));
}

/**
Expand All @@ -29,6 +32,7 @@ public function provides()
{
return [
PipelineHubContract::class,
'pipeline',
];
}
}
23 changes: 23 additions & 0 deletions src/Illuminate/Support/Facades/Pipeline.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
<?php

namespace Illuminate\Support\Facades;

class Pipeline extends Facade
{
/**
* Indicates if the resolved instance should be cached.
*
* @var bool
*/
protected static $cached = false;

/**
* Get the registered name of the component.
*
* @return string
*/
protected static function getFacadeAccessor()
{
return 'pipeline';
}
}
2 changes: 1 addition & 1 deletion src/Illuminate/Support/Facades/Request.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
* @method static \Symfony\Component\HttpFoundation\ParameterBag|mixed json(string|null $key = null, mixed $default = null)
* @method static \Illuminate\Http\Request createFrom(\Illuminate\Http\Request $from, \Illuminate\Http\Request|null $to = null)
* @method static \Illuminate\Http\Request createFromBase(\Symfony\Component\HttpFoundation\Request $request)
* @method static \Illuminate\Http\Request duplicate(array $query = null, array $request = null, array $attributes = null, array $cookies = null, array $files = null, array $server = null)
* @method static \Illuminate\Http\Request duplicate(array|null $query = null, array|null $request = null, array|null $attributes = null, array|null $cookies = null, array|null $files = null, array|null $server = null)
* @method static bool hasSession(bool $skipIfUninitialized = false)
* @method static \Symfony\Component\HttpFoundation\Session\SessionInterface getSession()
* @method static \Illuminate\Contracts\Session\Session session()
Expand Down