error() публичный Метод

This method automatically identifies the error as coming from this class. Fatal errors should still throw a WireException (or class derived from it)
public error ( string | array | Wire $text, integer | boolean $flags )
$text string | array | Wire
$flags integer | boolean See Notices::flags or specify TRUE to have the error also logged to errors.txt
Пример #1
0
 /**
  * Record an error message in the error log (errors.txt)
  *
  * Note: Fatal errors should instead throw a WireException.
  *
  * @param string $text
  * @param int|bool $flags Specify boolean true to also display the error interactively (admin only).
  * @return $this
  *
  */
 public function error($text, $flags = 0)
 {
     $flags = $flags === true ? Notice::log : $flags | Notice::logOnly;
     return parent::error($text, $flags);
 }
 /**
  * Record an error
  *
  * @param string $text
  * @param int|bool $flags See Notices::flags
  * @return $this
  *
  */
 public function error($text, $flags = 0)
 {
     $this->log($text);
     return parent::error($text, $flags);
 }
Пример #3
0
 public function error($text, $flags = 0)
 {
     $this->errors[] = $text;
     parent::error($text, $flags);
 }
Пример #4
0
 public function error($text)
 {
     $this->errors[] = $text;
     parent::error($text);
 }