-
Notifications
You must be signed in to change notification settings - Fork 42
Expand file tree
/
Copy pathOldInputServiceProvider.php
More file actions
42 lines (36 loc) · 973 Bytes
/
OldInputServiceProvider.php
File metadata and controls
42 lines (36 loc) · 973 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
<?php
/**
* @package WPEmerge
* @author Atanas Angelov <hi@atanas.dev>
* @copyright 2017-2019 Atanas Angelov
* @license https://www.gnu.org/licenses/gpl-2.0.html GPL-2.0
* @link https://wpemerge.com/
*/
namespace WPEmerge\Input;
use WPEmerge\ServiceProviders\ServiceProviderInterface;
/**
* Provide old input dependencies.
*
* @codeCoverageIgnore
*/
class OldInputServiceProvider implements ServiceProviderInterface {
/**
* {@inheritDoc}
*/
public function register( $container ) {
$container[ WPEMERGE_OLD_INPUT_KEY ] = function ( $c ) {
return new OldInput( $c[ WPEMERGE_FLASH_KEY ] );
};
$container[ OldInputMiddleware::class ] = function ( $c ) {
return new OldInputMiddleware( $c[ WPEMERGE_OLD_INPUT_KEY ] );
};
$app = $container[ WPEMERGE_APPLICATION_KEY ];
$app->alias( 'oldInput', WPEMERGE_OLD_INPUT_KEY );
}
/**
* {@inheritDoc}
*/
public function bootstrap( $container ) {
// Nothing to bootstrap.
}
}