1: | <?php
2: | namespace Opencart\Catalog\Controller\Startup;
3: | /**
4: | * Class Api
5: | *
6: | * @package Opencart\Catalog\Controller\Startup
7: | */
8: | class Api extends \Opencart\System\Engine\Controller {
9: | /**
10: | * @return \Opencart\System\Engine\Action|null
11: | */
12: | public function index(): ?\Opencart\System\Engine\Action {
13: | if (isset($this->request->get['route'])) {
14: | $route = (string)$this->request->get['route'];
15: | } else {
16: | $route = '';
17: | }
18: |
19: | if (substr($route, 0, 4) == 'api/' && $route !== 'api/account/login' && !isset($this->session->data['api_id'])) {
20: | return new \Opencart\System\Engine\Action('error/permission');
21: | }
22: |
23: | return null;
24: | }
25: | }
26: |

OpenCart API API documentation generated by ApiGen dev-master