Completed
Push — master ( ec393a...539bbb )
by Aimeos
12:50
created

Symfony2::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 7
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 7
rs 9.4285
cc 1
eloc 4
nc 1
nop 2
1
<?php
2
3
/**
4
 * @license LGPLv3, http://opensource.org/licenses/LGPL-3.0
5
 * @copyright Aimeos (aimeos.org), 2014-2016
6
 * @package MW
7
 * @subpackage View
8
 */
9
10
11
namespace Aimeos\MW\View\Helper\Response;
12
13
14
/**
15
 * View helper class for retrieving data from Symfony2 responses.
16
 *
17
 * @package MW
18
 * @subpackage View
19
 */
20
class Symfony2
21
	extends \Aimeos\MW\View\Helper\Response\Standard
0 ignored issues
show
Coding Style introduced by
The extends keyword must be on the same line as the class name
Loading history...
Coding Style introduced by
Expected 0 spaces between "Standard" and comma; 1 found
Loading history...
22
	implements \Aimeos\MW\View\Helper\Response\Iface
0 ignored issues
show
Coding Style introduced by
The implements keyword must be on the same line as the class name
Loading history...
23
{
24
	/**
25
	 * Initializes the URL view helper.
26
	 *
27
	 * @param \Aimeos\MW\View\Iface $view View instance with registered view helpers
28
	 * @param \Symfony\Component\HttpFoundation\Response $response Symfony2 response object
29
	 */
30
	public function __construct( $view, \Symfony\Component\HttpFoundation\Response $response )
31
	{
32
		$factory = new \Symfony\Bridge\PsrHttpMessage\Factory\DiactorosFactory();
33
		$psr7response = $factory->createResponse( $response );
34
35
		parent::__construct( $view, $psr7response );
36
	}
37
}
38