@param string $message
@param mixed $data

@return self
8844
public function trace($message, $data)
    {
        // TODO: Implement trace() method.
        $this->logMessages->enqueue([
            'date'    => date('Y-m-d H:i:s'),
            'message' => $message,
            'data'    => $data
        ]);

        return $this;
    }
124578
public function message($message)
    {
        if (is_string($message) || is_numeric($message)) {
            $message = new Text($message);
        }

        if (!($message instanceof Message)) {
            throw new InvalidArgumentException('Invalid message.');
        }

        $this->message = $message;

        return $this;
    }
1017963
public static function fromArray(array $data)
	{
		return new self(
			!empty($data['code'])    ? $data['code']    : null,
			!empty($data['message']) ? $data['message'] : null,
			!empty($data['data'])    ? $data['data']    : null
		);
	}
970200
public static function fromMessage(Message $msg)
    {
        $workerHandlerId = $msg->shift();
        $requestId = $msg->shift();
        if (!$requestId) {
            $requestId = null;
        }

        return new self($workerHandlerId, $requestId);
    }
977036
public static function fromArray(array $data)
    {
        return new Messages(
            new Message(isset($data['right-message']) ? $data['right-message'] : ''),
            new Message(isset($data['error-message']) ? $data['error-message'] : '')
        );
    }
144068
public function commit($message) {
    $this->getRunnerWithDirectory()->run($this->getResettedCommandBuilder()->addSubcommand('commit')->addFlag('m', $message));
    return $this;
  }
1047853
public function setMessage(string $message)
    {
        if (strlen($message) > 0) {
            $properties = $this->getProperties();
            $properties['message'] = $message;
            $this->setProperties($properties);
            return $this;
        }
        return false;
    }
697981
public function createChildEvent(Message $message): self
    {
        if (!$this->supportsRecursion()) {
            throw new \LogicException(sprintf('%s does not support recursion.', get_called_class()));
        }

        $event = new static($message);
        $event->depth = $this->depth + 1;
        $event->parentEvent = $this;
        return $event;
    }
684439
public function message(string $message)
    {
        $this->_validations[\count($this->_validations) - 1]['message'] = $message;

        return $this;
    }
828148
public function add($key, $message)
    {
        if ($this->isUnique($key, $message)) {
            $this->messages[$key][] = $message;
        }

        return $this;
    }
612455
public function oneOf($allowed, $message = null)
    {
        if (is_string($allowed)) {
            $allowed = explode(',', $allowed);
        }

        $this->setRule(__FUNCTION__, function($val, $args)
                       {
                           return in_array($val, $args[0]);
                       }, $message, array($allowed));
        return $this;
    }
534426
public function setStatusMessage($message)
    {
        if($entity = $this->getIterator()->current()) {
            $entity->setStatusMessage($message);
        }

        return $this;
    }
879274
public function log($message)
    {
        $app = Base::instance();
        if ($app['LOG_FILE']) {
            if (null === $this->logger) {
                $this->logger = new Log($app['LOG_FILE']);
            }
            $this->logger->write($message);
        }

        return $this;
    }
1353630
public function addMessage($item, $message = null)
    {
        if ($message === null || $message === '') {
            return $this;
        }
        if (!array_key_exists($item, $this->messages)) {
            $this->messages[$item] = array();
        }
        $this->messages[$item][] = $message;

        return $this;
    }
680901
public function appendMessage($message)
    {
        $context = $this->_context;

        $context->messages[$message->field][] = $message;

        return $this;
    }
127594
public static function html($message, $data = null)
    {
        if (!static::$on) {
            return;
        }

        echo "<hr>";
        echo "<i>";
            static::indent();
            echo "<b>" . static::getTime() . " - " . $message . "</b>";
            if (is_array($data)) {
                Html::print_r($data);
            } elseif ($data) {
                static::indent();
                echo "&nbsp;&nbsp;&nbsp;&nbsp;" . $data . "<br>";
            }
        echo "</i>";
    }
1247910
public function setFieldMessage(
        $fieldName,
        $message,
        $messageType = ValidationResult::TYPE_ERROR,
        $messageCast = ValidationResult::CAST_TEXT
    ) {
        $field = $this->fields->dataFieldByName($fieldName);
        if ($field) {
            $field->setMessage($message, $messageType, $messageCast);
        }
        return $this;
    }