diff options
Diffstat (limited to 'app/ServiceProvider/AvatarProvider.php')
-rw-r--r-- | app/ServiceProvider/AvatarProvider.php | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/app/ServiceProvider/AvatarProvider.php b/app/ServiceProvider/AvatarProvider.php new file mode 100644 index 00000000..2bbc9c03 --- /dev/null +++ b/app/ServiceProvider/AvatarProvider.php @@ -0,0 +1,31 @@ +<?php + +namespace Kanboard\ServiceProvider; + +use Pimple\Container; +use Pimple\ServiceProviderInterface; +use Kanboard\Core\User\Avatar\AvatarManager; +use Kanboard\User\Avatar\GravatarProvider; + +/** + * Avatar Provider + * + * @package serviceProvider + * @author Frederic Guillot + */ +class AvatarProvider implements ServiceProviderInterface +{ + /** + * Register providers + * + * @access public + * @param \Pimple\Container $container + * @return \Pimple\Container + */ + public function register(Container $container) + { + $container['avatarManager'] = new AvatarManager; + $container['avatarManager']->register(new GravatarProvider($container)); + return $container; + } +} |