Created
December 31, 2014 02:03
-
-
Save kirkbushell/67eedb13c96f0d19cb72 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class UsersServiceProvider extends ServiceProvider | |
{ | |
/** | |
* Defer until needed. | |
*/ | |
public $defer = true; | |
/** | |
* Repositories defined by the users module. | |
* | |
* @var array | |
*/ | |
protected $repositories = [ | |
UserRepositoryInterface::class => EloquentUserRepository::class | |
]; | |
/** | |
* Define the listeners for this module. | |
* | |
* @var array | |
*/ | |
protected $listeners = [ | |
'Tectonic.Shift.Modules.Identity.Users.Events.UserHasRegistered' => NotificationListener::class | |
]; | |
/** | |
* Ensure that the repository interface can be bound once called. | |
* | |
* @return array | |
*/ | |
public function provides() | |
{ | |
return [ | |
UserRepositoryInterface::class | |
]; | |
} | |
/** | |
* There are some events that require the service provider to be registered. | |
* | |
* @return array | |
*/ | |
public function when() | |
{ | |
return [ | |
'Tectonic.Shift.Modules.Identity.Users.Events.UserHasRegistered' | |
]; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment