Back to Opencart

File admin\controller\startup\application.php

docs/api/source-admin.controller.startup.application.html

4.1.0.36.1 KB
Original Source

Namespaces

Classes

| 1: | <?php | | 2: | namespace Opencart\Admin\Controller\Startup; | | 3: | /** | | 4: | * Class Application | | 5: | * | | 6: | * @package Opencart\Admin\Controller\Startup | | 7: | */ | | 8: | class Application extends \Opencart\System\Engine\Controller { | | 9: | /** | | 10: | * Index | | 11: | * | | 12: | * @return void | | 13: | */ | | 14: | public function index(): void { | | 15: | // Url | | 16: | $this->registry->set('url', new \Opencart\System\Library\Url($this->config->get('site_url'))); | | 17: | | | 18: | // Customer | | 19: | $this->registry->set('customer', new \Opencart\System\Library\Cart\Customer($this->registry)); | | 20: | | | 21: | // Currency | | 22: | $this->registry->set('currency', new \Opencart\System\Library\Cart\Currency($this->registry)); | | 23: | | | 24: | // Tax | | 25: | $this->registry->set('tax', new \Opencart\System\Library\Cart\Tax($this->registry)); | | 26: | | | 27: | if ($this->config->get('config_tax_default') == 'shipping') { | | 28: | $this->tax->setShippingAddress((int)$this->config->get('config_country_id'), (int)$this->config->get('config_zone_id')); | | 29: | } | | 30: | | | 31: | if ($this->config->get('config_tax_default') == 'payment') { | | 32: | $this->tax->setPaymentAddress((int)$this->config->get('config_country_id'), (int)$this->config->get('config_zone_id')); | | 33: | } | | 34: | | | 35: | $this->tax->setStoreAddress((int)$this->config->get('config_country_id'), (int)$this->config->get('config_zone_id')); | | 36: | | | 37: | // Weight | | 38: | $this->registry->set('weight', new \Opencart\System\Library\Cart\Weight($this->registry)); | | 39: | | | 40: | // Length | | 41: | $this->registry->set('length', new \Opencart\System\Library\Cart\Length($this->registry)); | | 42: | | | 43: | // Cart | | 44: | $this->registry->set('cart', new \Opencart\System\Library\Cart\Cart($this->registry)); | | 45: | | | 46: | $this->load->helper('validation'); | | 47: | } | | 48: | } | | 49: | |

OpenCart API API documentation generated by ApiGen dev-master