Bitrix-D7 23.9
 
Загрузка...
Поиск...
Не найдено
baseapiobject.php
1<?php
2
3namespace Bitrix\Seo\Checkout;
4
10{
11 const TYPE_CODE = '';
12
14 protected $request;
15
17 protected $service;
18
22 public function __construct()
23 {
24 $this->request = Request::create(static::TYPE_CODE);
25 }
26
30 public function getRequest()
31 {
32 return $this->request;
33 }
34
39 public function setRequest(Request $request)
40 {
41 $this->request = $request;
42 return $this;
43 }
44
52 public static function create($type, $parameters = null, IService $service = null)
53 {
54 $instance = Factory::create(get_called_class(), $type, $parameters);
55 if ($service)
56 {
57 $instance->setService($service);
58 }
59
60 return $instance;
61 }
62
68 public function setService(IService $service)
69 {
70 $this->service = $service;
71 $this->request->setAuthAdapter($this->service->getAuthAdapter(static::TYPE_CODE));
72
73 return $this;
74 }
75}
static create($type, $parameters=null, IService $service=null)
static create($object, $type, $parameters=null)
Definition factory.php:20