1 | <?php |
||
15 | class Affiliate { |
||
16 | |||
17 | /** |
||
18 | * Class instance |
||
19 | * |
||
20 | * @var Affiliate This class instance. |
||
21 | **/ |
||
22 | private static $instance = null; |
||
23 | |||
24 | /** |
||
25 | * Initializes the class or returns the singleton |
||
26 | * |
||
27 | * @return Affiliate | false |
||
28 | */ |
||
29 | public static function init() { |
||
35 | |||
36 | /** |
||
37 | * Returns the affiliate code from database after filtering it. |
||
38 | * |
||
39 | * @return string The affiliate code. |
||
40 | */ |
||
41 | public function get_affiliate_code() { |
||
49 | |||
50 | /** |
||
51 | * Returns the passed URL with the affiliate code added as a URL query arg. |
||
52 | * |
||
53 | * @param string $url The URL where the code will be added. |
||
54 | * |
||
55 | * @return string The passed URL with the code added. |
||
56 | */ |
||
57 | public function add_code_as_query_arg( $url ) { |
||
64 | } |
||
65 |