diff options
author | Frederic Guillot <fred@kanboard.net> | 2016-03-18 23:06:32 -0400 |
---|---|---|
committer | Frederic Guillot <fred@kanboard.net> | 2016-03-18 23:06:32 -0400 |
commit | fa86542f90774d7a7d8f3e81ee35821ca25b7fd4 (patch) | |
tree | e6dd027dc827b18e07536414cf4fb86321763060 /app/ServiceProvider/AvatarProvider.php | |
parent | c4c200b530e0585fafadce41f75e383ec0ff057e (diff) |
Added pluggable Avatar providers
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; + } +} |