Wire::_notice PHP Method

_notice() protected method

Record a Notice, internal use (contains the code for message, warning and error methods)
protected _notice ( $text, integer $flags, string $name, string $class )
$flags integer Flags bitmask
$name string Name of container
$class string Name of Notice class
    protected function _notice($text, $flags, $name, $class)
    {
        if ($flags === true) {
            $flags = Notice::log;
        }
        $notice = new $class($text, $flags);
        $notice->class = $this->className();
        if (is_null($this->_notices[$name])) {
            $this->_notices[$name] = new Notices();
        }
        $this->wire('notices')->add($notice);
        if (!($notice->flags & Notice::logOnly)) {
            $this->_notices[$name]->add($notice);
        }
        return $this;
    }