1 | <?php |
||
31 | class Module extends \yii\base\Module |
||
32 | { |
||
33 | /** |
||
34 | * @var array array of the options that will be passed to [[set]] |
||
35 | */ |
||
36 | public $shoppingCartOptions = []; |
||
37 | |||
38 | /** |
||
39 | * Cart component ID. |
||
40 | */ |
||
41 | const CART_COMPONENT_ID = 'cart'; |
||
42 | |||
43 | /** |
||
44 | * {@inheritdoc} |
||
45 | * @throws \yii\base\InvalidConfigException |
||
46 | 5 | */ |
|
47 | public function init() |
||
58 | |||
59 | /** |
||
60 | * Registers translations. |
||
61 | * @void |
||
62 | 5 | */ |
|
63 | public function registerTranslations() |
||
74 | |||
75 | /** |
||
76 | * @var string the module name |
||
77 | */ |
||
78 | public static $name = 'cart'; |
||
79 | |||
80 | /** |
||
81 | * Finds cart module. |
||
82 | * TODO think of how to find NOT by name. |
||
83 | 1 | */ |
|
84 | public static function getInstance() |
||
88 | |||
89 | /** |
||
90 | * @throws \yii\base\InvalidConfigException |
||
91 | * @return null|\yz\shoppingcart\ShoppingCart|ShoppingCart |
||
92 | 1 | */ |
|
93 | public function getCart() |
||
97 | 1 | ||
98 | public function createUrl($route = null) |
||
105 | |||
106 | /** |
||
107 | * @var string|array route to the terms of use page, suitable for Url::to(). |
||
108 | */ |
||
109 | public $termsPage; |
||
110 | |||
111 | /** |
||
112 | * @var string|array route to the order page, suitable for Url::to(). |
||
113 | */ |
||
114 | public $orderPage = ['order']; |
||
115 | |||
116 | protected $_orderButton; |
||
117 | 1 | ||
118 | public function setOrderButton($value) |
||
122 | 1 | ||
123 | public function getOrderButton() |
||
127 | |||
128 | protected $_paymentMethods; |
||
129 | 1 | ||
130 | public function setPaymentMethods($value) |
||
134 | 1 | ||
135 | public function getPaymentMethods() |
||
139 | |||
140 | public function getBuyMoreLinks(): array |
||
157 | } |
||
158 |
This check marks access to variables or properties that have not been declared yet. While PHP has no explicit notion of declaring a variable, accessing it before a value is assigned to it is most likely a bug.