Esempio n. 1
0
 /**
  * @param string $messageLabel optional Label for error message.  Used to load the appropriate translated message.
  * @param array $msgArgs optional set of arguments to substitute into error message string
  * @param string|null $moduleName Provide module name if $messageLabel is a module string, leave empty if
  *  $messageLabel is in app strings.
  * @param int $httpCode
  * @param string $errorLabel
  */
 public function __construct($messageLabel = null, $msgArgs = null, $moduleName = null, $httpCode = 0, $errorLabel = null)
 {
     if ($httpCode != 0) {
         $this->httpCode = $httpCode;
     }
     parent::__construct($messageLabel, $msgArgs, $moduleName, $errorLabel);
     if (!empty($this->messageLabel)) {
         $this->descriptionLabel = $this->messageLabel . '_DESC';
     }
 }
 /**
  * @param string $messageLabel optional Label for error message.  Used to load the appropriate translated message.
  * @param array $msgArgs optional set of arguments to substitute into error message string
  * @param string|null $moduleName Provide module name if $messageLabel is a module string, leave empty if
  *  $messageLabel is in app strings.
  * @param int $httpCode
  * @param string $errorLabel
  */
 function __construct($messageLabel = null, $msgArgs = null, $moduleName = null, $errorLabel = null)
 {
     if (!empty($messageLabel)) {
         $this->messageLabel = $messageLabel;
     }
     if (!empty($errorLabel)) {
         $this->errorLabel = $errorLabel;
     }
     if (!empty($moduleName)) {
         $this->moduleName = $moduleName;
     }
     if (!empty($msgArgs)) {
         $this->msgArgs = $msgArgs;
     }
     $this->setMessage($this->messageLabel, $this->msgArgs, $this->moduleName);
     parent::__construct($this->message);
 }