Completed
Push — master ( 0513f3...46cdfb )
by Daniel
03:05
created

MethodLoader::load()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 10
Code Lines 7

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 1
Metric Value
c 1
b 0
f 1
dl 0
loc 10
rs 9.4285
cc 1
eloc 7
nc 1
nop 2
1
<?php
2
3
namespace Cmobi\CmobiRabbitmqBundle\Routing;
4
5
use Cmobi\RabbitmqBundle\Routing\MethodCollection;
6
use Symfony\Component\Config\Loader\Loader;
7
8
class MethodLoader extends Loader
9
{
10
11
    public function load($resource, $type = null)
12
    {
13
        $collection = new MethodCollection();
14
        $resource = 'app/config/rpc_routing.yml';
15
        $type = 'yaml';
16
        $importedRouters = $this->import($resource, $type);
17
        $collection->addCollection($importedRouters);
18
19
        return $collection;
20
    }
21
22
    public function supports($resource, $type = null)
23
    {
24
        return 'rpc' === $type;
25
    }
26
}