Subversion Repositories cheapmusic

Rev

Rev 20 | Rev 65 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 20 Rev 54
Line 5... Line 5...
5
    private static $ebay = [];
5
    private static $ebay = [];
6
    private static $discogs = [];
6
    private static $discogs = [];
7
    private static $linkshare = [];
7
    private static $linkshare = [];
8
    private static $cjaffiliate = [];
8
    private static $cjaffiliate = [];
9
    private static $walmart = [];
9
    private static $walmart = [];
-
 
10
    private static $itunes = [];
10
 
11
 
11
    const EBAY = 0;
12
    const EBAY = 0;
12
    const DISCOGS = 1;
13
    const DISCOGS = 1;
13
    const LINKSHARE = 2;
14
    const LINKSHARE = 2;
14
    const CJAFFILIATE = 3;
15
    const CJAFFILIATE = 3;
15
    const WALMART = 4;
16
    const WALMART = 4;
-
 
17
    const ITUNES = 5;
16
 
18
 
17
    public static function getInstance()
19
    public static function getInstance()
18
    {
20
    {
19
        if (is_null(self::$instance)){
21
        if (is_null(self::$instance)){
20
            self::$instance = new self();
22
            self::$instance = new self();
Line 33... Line 35...
33
            self::$linkshare = $vendorArray;
35
            self::$linkshare = $vendorArray;
34
        } else if ($type == self::CJAFFILIATE) {
36
        } else if ($type == self::CJAFFILIATE) {
35
            self::$cjaffiliate = $vendorArray;
37
            self::$cjaffiliate = $vendorArray;
36
        } else if ($type == self::WALMART) {
38
        } else if ($type == self::WALMART) {
37
            self::$walmart = $vendorArray;
39
            self::$walmart = $vendorArray;
-
 
40
        } else if ($type == self::ITUNES) {
-
 
41
            self::$itunes = $vendorArray;
38
        }
42
        }
39
    }
43
    }
40
 
44
 
41
    public function getVendor($type)
45
    public function getVendor($type)
42
    {
46
    {
Line 48... Line 52...
48
            return self::$linkshare;
52
            return self::$linkshare;
49
        } else if ($type == self::CJAFFILIATE) {
53
        } else if ($type == self::CJAFFILIATE) {
50
            return self::$cjaffiliate;
54
            return self::$cjaffiliate;
51
        } else if ($type == self::WALMART) {
55
        } else if ($type == self::WALMART) {
52
            return self::$walmart;
56
            return self::$walmart;
-
 
57
        } else if ($type == self::ITUNES) {
-
 
58
            return self::$itunes;
53
        }
59
        }
54
 
60
 
55
        return null;
61
        return null;
56
    }
62
    }
57
}
63
}