Skip to content

Commit

Permalink
Add User service provider (#902)
Browse files Browse the repository at this point in the history
  • Loading branch information
remyperona authored Sep 30, 2024
1 parent 045f9f7 commit dc2a835
Show file tree
Hide file tree
Showing 2 changed files with 39 additions and 0 deletions.
38 changes: 38 additions & 0 deletions classes/User/ServiceProvider.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
<?php
declare(strict_types=1);

namespace Imagify\User;

use Imagify\Dependencies\League\Container\ServiceProvider\AbstractServiceProvider;

/**
* Service provider for Picture display
*/
class ServiceProvider extends AbstractServiceProvider {
/**
* Services provided by this provider
*
* @var array
*/
protected $provides = [
'user',
];

/**
* Registers the provided classes
*
* @return void
*/
public function register() {
$this->getContainer()->add( 'user', User::class );
}

/**
* Returns the subscribers array
*
* @return array
*/
public function get_subscribers() {
return [];
}
}
1 change: 1 addition & 0 deletions config/providers.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,5 @@
'Imagify\Picture\ServiceProvider',
'Imagify\Stats\ServiceProvider',
'Imagify\Webp\ServiceProvider',
'Imagify\User\ServiceProvider',
];

0 comments on commit dc2a835

Please sign in to comment.