JsonMapper::__construct()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 1
c 0
b 0
f 0
nc 1
nop 0
dl 0
loc 3
rs 10
1
<?php
2
/**
3
 * @author Oskar van Velden <[email protected]>
4
 * @author Rik van der Kemp <[email protected]>
5
 * @copyright Zicht Online <http://zicht.nl>
6
 */
7
8
namespace Zicht\Bundle\UrlBundle\Aliasing\Mapper;
9
10
/**
11
 * Class JsonMapper
12
 *
13
 * Helper to map urls in an JSON string from internal to public aliasing or vice versa.
14
 *
15
 * @package Zicht\Bundle\UrlBundle\Aliasing
16
 * @deprecated This implementation is rather optimistic: it replaces all "value" keys
17
 */
18
class JsonMapper extends AbstractMapper
19
{
20
    /**
21
     * Constructor
22
     */
23
    public function __construct()
24
    {
25
        parent::__construct(['application/json'], '/((?:"value")\s*:\s*")([^"]+)(["])/');
26
    }
27
}
28