WishlistParser::__construct()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 7
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 2
Bugs 0 Features 0
Metric Value
c 2
b 0
f 0
dl 0
loc 7
rs 9.4285
cc 1
eloc 4
nc 1
nop 1
1
<?php
2
/**
3
 * User: ms
4
 * Date: 12.10.15
5
 * Time: 22:16
6
 */
7
8
namespace Amazon;
9
10
/**
11
 * Class WishlistParser
12
 * @deprecated
13
 * @package Amazon
14
 */
15
class WishlistParser extends Parser
16
{
17
	/**
18
	 * @var null
19
	 */
20
	private $wishlistId = null;
21
22
	public function __construct($url)
23
	{
24
		parent::__construct($url);
25
		$urlParameter = parse_url($this->getUrl());
26
27
		$this->processWishListUrl($urlParameter);
28
	}
29
30
	protected function processWishListUrl($urlParameter)
31
	{
32
		$paramArray = explode('/', $urlParameter['path']);
33
34
		$this->wishlistId = $paramArray[4];
35
36
	}
37
38
	/**
39
	 * @return null
40
	 */
41
	public function getWishlistId()
42
	{
43
		return $this->wishlistId;
44
	}
45
46
47
}