Completed
Push — develop ( dfd31d...f6e11d )
by
unknown
17:02
created

PaginatorService::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 2
Bugs 2 Features 0
Metric Value
c 2
b 2
f 0
dl 0
loc 5
rs 9.4285
cc 1
eloc 3
nc 1
nop 2
1
<?php
2
/**
3
 * YAWIK
4
 *
5
 * @filesource
6
 * @copyright (c) 2013 - 2016 Cross Solution (http://cross-solution.de)
7
 * @license   MIT
8
 * @author    [email protected]
9
 */
10
11
namespace Core\Paginator;
12
13
use Zend\ServiceManager\AbstractPluginManager;
14
use Zend\ServiceManager\ConfigInterface;
15
use Zend\ServiceManager\ServiceLocatorInterface;
16
use Zend\Paginator\Paginator;
17
18
/**
19
 * Class PaginatorService
20
 * @package Core\Paginator
21
 */
22
class PaginatorService extends AbstractPluginManager
23
{
24
25
    public function __construct(ServiceLocatorInterface $serviceLocator, ConfigInterface $configuration = null)
26
    {
27
        parent::__construct($configuration);
28
        $this->serviceLocator = $serviceLocator;
29
    }
30
    
31
    /**
32
     * check class
33
     *
34
     * @param mixed $plugin
35
     * @return bool|void
36
     */
37
    public function validatePlugin($plugin)
38
    {
39
        if ($plugin instanceof Paginator) {
40
            return true;
41
        }
42
        return false;
43
    }
44
}
45