Bitrix-D7 23.9
 
Загрузка...
Поиск...
Не найдено
error.php
1<?php
2
4
6
11final class Error extends Main\Error
12{
13 private const BINDING_LEVEL_BUYER = 10;
14
15 private $bindingLevel = null;
16
17 protected function setBindingLevel($level) : self
18 {
19 $this->bindingLevel = $level;
20
21 return $this;
22 }
23
24 public function isVisibleForBuyer() : bool
25 {
26 return $this->bindingLevel === self::BINDING_LEVEL_BUYER;
27 }
28
29 public static function createForBuyer($message, $code = 0, $customData = null) : self
30 {
31 $error = new static($message, $code, $customData);
32
33 return $error->setBindingLevel(self::BINDING_LEVEL_BUYER);
34 }
35
36 public static function create($message, $code = 0, $customData = null) : self
37 {
38 return new static($message, $code, $customData);
39 }
40}
static create($message, $code=0, $customData=null)
Definition error.php:36
static createForBuyer($message, $code=0, $customData=null)
Definition error.php:29