Completed
Pull Request — develop (#241)
by ANTHONIUS
08:03
created

ConnectionOptionFactory::createService()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 8
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 1
Metric Value
c 1
b 0
f 1
dl 0
loc 8
rs 9.4285
cc 1
eloc 4
nc 1
nop 1
1
<?php
2
/**
3
 * YAWIK
4
 *
5
 * @copyright (c) 2013 - 2016 Cross Solution (http://cross-solution.de)
6
 * @license   MIT
7
 */
8
9
namespace Solr\Factory;
10
11
12
use Solr\Options\Connection;
13
use Zend\ServiceManager\FactoryInterface;
14
use Zend\ServiceManager\ServiceLocatorInterface;
15
16
class ConnectionOptionFactory implements FactoryInterface
17
{
18
    public function createService(ServiceLocatorInterface $serviceLocator)
19
    {
20
        $config = $serviceLocator->get('Configuration');
21
22
        $service = new Connection($config['solr']['connection']);
23
24
        return $service;
25
    }
26
27
}