Total Complexity | 4 |
Total Lines | 88 |
Duplicated Lines | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
5 | class Arraybuilder |
||
6 | { |
||
7 | public $search; |
||
8 | public $location; |
||
9 | |||
10 | public function __construct() |
||
11 | { |
||
12 | $config = include('config/config.php'); |
||
13 | $this->location = $config->location; |
||
14 | |||
15 | } |
||
16 | |||
17 | public function setSizeSearch($size) |
||
18 | { |
||
19 | $this->search = array( |
||
20 | 'locationNumber' => $this->location, |
||
21 | 'criteria' => array( |
||
22 | 'entry' => array( |
||
23 | 'key'=> 'Size', |
||
24 | 'value'=>$size |
||
25 | ) |
||
26 | ), |
||
27 | 'options' => array( |
||
28 | 'price' => array( |
||
29 | 'cost'=>'1', |
||
30 | 'retail'=>'1' |
||
31 | ), |
||
32 | 'availability' => array( |
||
33 | 'local'=>'1' |
||
34 | ), |
||
35 | 'productSpec'=> array( |
||
36 | 'entry'=> array( |
||
37 | 'key'=>'SpeedRating' |
||
38 | ), |
||
39 | 'entry'=> array( |
||
40 | 'key'=>'TemperatureRating' |
||
41 | ) |
||
42 | ), |
||
43 | 'includeRebates'=>'1' |
||
44 | ) |
||
45 | ); |
||
46 | return $this->search; |
||
47 | } |
||
48 | |||
49 | public function setKeywordSearch($word) |
||
50 | { |
||
51 | $this->search = array( |
||
52 | 'locationNumber' => $this->location, |
||
53 | 'keywords' => $word, |
||
54 | 'options' => array( |
||
55 | 'images' => array( |
||
56 | 'thumbnail'=>'1', |
||
57 | 'small'=> '1', |
||
58 | 'large'=> '1', |
||
59 | ) |
||
60 | ) |
||
61 | ); |
||
62 | return $this->search; |
||
63 | } |
||
64 | |||
65 | public function setATDProductNumber($number) |
||
93 | } |
||
94 | |||
95 | |||
96 | } |