summaryrefslogtreecommitdiff
path: root/app/ServiceProvider/ExternalLinkProvider.php
blob: 8b71ec81aa27b9e1b69d4298e3f32256e61eb2c4 (plain)
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
<?php

namespace Kanboard\ServiceProvider;

use Pimple\Container;
use Pimple\ServiceProviderInterface;
use Kanboard\Core\ExternalLink\ExternalLinkManager;
use Kanboard\ExternalLink\WebLinkProvider;
use Kanboard\ExternalLink\AttachmentLinkProvider;
use Kanboard\ExternalLink\FileLinkProvider;

/**
 * External Link Provider
 *
 * @package serviceProvider
 * @author  Frederic Guillot
 */
class ExternalLinkProvider implements ServiceProviderInterface
{
    /**
     * Register providers
     *
     * @access public
     * @param  \Pimple\Container $container
     * @return \Pimple\Container
     */
    public function register(Container $container)
    {
        $container['externalLinkManager'] = new ExternalLinkManager($container);
        $container['externalLinkManager']->register(new WebLinkProvider($container));
        $container['externalLinkManager']->register(new AttachmentLinkProvider($container));
        $container['externalLinkManager']->register(new FileLinkProvider($container));

        return $container;
    }
}