Completed
Push — develop ( 09456b...2094a2 )
by Mathias
14s queued 10s
created

ProfileControllerFactory   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 16
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 2

Importance

Changes 0
Metric Value
wmc 1
c 0
b 0
f 0
lcom 0
cbo 2
dl 0
loc 16
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A __invoke() 0 13 1
1
<?php
2
3
/**
4
 * YAWIK
5
 *
6
 * @filesource
7
 * @license MIT
8
 * @copyright  2013 - 2017 Cross Solution <http://cross-solution.de>
9
 */
10
11
namespace Organizations\Factory\Controller;
12
use Interop\Container\ContainerInterface;
13
use Organizations\Controller\ProfileController;
14
use Zend\ServiceManager\Factory\FactoryInterface;
15
16
/**
17
 * Create new ProfileController object
18
 *
19
 * @author Anthonius Munthi <[email protected]>
20
 * @package Organizations\Factory\Controller
21
 * @since 0.30
22
 */
23
class ProfileControllerFactory implements FactoryInterface
24
{
25
    public function __invoke(ContainerInterface $container, $requestedName, array $options = null)
26
    {
27
        $repo = $container->get('repositories')
28
            ->get('Organizations/Organization')
29
        ;
30
        $jobRepository = $container->get('repositories')
31
            ->get('Jobs/Job')
32
        ;
33
        $translator = $container->get('translator');
34
        $imageFileCacheManager = $container->get('Organizations\ImageFileCache\Manager');
35
        $options = $container->get('Jobs/JobboardSearchOptions');
36
        return new ProfileController($repo,$jobRepository,$translator,$imageFileCacheManager,['count' => $options->getPerPage()]);
37
    }
38
}
39