Tags traits about the user.

@param  [array] $message
@return [boolean] whether the track call succeeded
501380
public function identify(array $message) {
    $message = $this->message($message, "traits");
    $message["type"] = "identify";

    return $this->consumer->identify($message);
  }
77834
public function hasTranslation($message) {
		if($this->language === null) {
			$this->initLanguage();
		}
		
		//Load the main file
		if($this->msg === null) {
			$this->retrieveMessages($this->language);
		}
		
		//If the translation is not in the main file, load the custom file associated to the message
		if(!isset($this->msg[$message])) {
			$this->retrieveCustomMessages($message, $this->language);
		}
		
		if (isset($this->msg[$message])) {
			return true;
		} else {
			return false;
		}
	}
1211523
private function checkMessageResult($message, \ArrayIterator $recipients)
    {
        $hasDeviceError = false;

        $recipientCount = $recipients->count();

        for ($i = 0; $i <= $recipientCount; $i++) {
            if (isset($message->results[$i]['registration_id'])) {
                $hasDeviceError = true;
                $recipients->offsetGet($i)->setIdentifierToReplaceTo($message->results[$i]['registration_id']);
            }

            if (isset($message->results[$i]['error'])) {
                $hasDeviceError = true;
                $error = $message->results[$i]['error'];
                $this->processError($error, $recipients->offsetGet($i));
            }
        }

        if ($hasDeviceError) {
            throw new InvalidRecipientException("Device identifier error status", $recipients);
        }
    }
1205459
protected function onSuccess(array $message)
    {
        list($topic, $payload, $sequence) = $message;

        $sequence = strlen(bin2hex($sequence)) == PHP_INT_SIZE ?
            unpack('I', $sequence)[1] : 0;

        if ($this->sequence > 0 && (($this->sequence + 1) != $sequence)) {
            throw new UnexpectedValueException(
                "Broken sequence on sequence number $sequence. ".
                'Detected lost notifications.'
            );
        }

        return ($this->callback)(
            bin2hex($payload),
            $this->sequence = $sequence
        );
    }
71366
protected function success($message)
    {
        if ($this->isVerbose() === true) {
            $this->out("%g${message}%n", true);
        }
        
        exit(self::EXIT_SUCCESS);
    }
466874
function checkMessageSignature($message)
    {
        $sig = $message->getArg(Auth_OpenID_OPENID_NS,
                                'sig');

        if (!$sig || Auth_OpenID::isFailure($sig)) {
            return false;
        }

        $calculated_sig = $this->getMessageSignature($message);
        return Auth_OpenID_CryptUtil::constEq($calculated_sig, $sig);
    }
1190524
protected function _watch($message)
    {
        $reference = $message->reference();
        if (!$reference) {
            Suite::register($message->name());
            return $message;
        }
        if (is_object($reference)) {
            Suite::register(get_class($reference));
        }
        Suite::register(Suite::hash($reference));
        return $message;
    }
1302409
public function sendMessage(Message $message) {
        if ($this->isDisabled()) {
            return false;
        }

        $users = $message->getMyDestionationUsers($this->container);
        $sentCount = 0;
        foreach($users as $user) {
            //if($user->getId() != $message->getFromUser()->getId()){
            $sentCount += $this->sendMessageToUser($message, $user);
            //}
        }
        return $sentCount;
    }
942198
public static function d($message, $tags = array())
    {
        
		self::singleton()->log(self::DEBUG_LEVEL, $message, $tags);
        
    }
1263847
private function memberMentions($message)
    {
        $filteredMessage = $message['content'];
        foreach ($message['mentions'] as $mention) {
            $filteredMessage = str_replace('<@'.$mention['id'].'>', '@'.$mention['username'], $filteredMessage);
        }
        return $filteredMessage;
    }
455174
protected function getAttachmentsArray($message)
    {
        $attachments = array();

        foreach ($message->getChildren() as $entity) {
            if ($entity instanceof Swift_Attachment) {
                $attachments[] = array(
                    'name' => $entity->getFilename(),
                    'data' => $entity->getBody(),
                    'content_id' => "<{$entity->getContentType()}>"
                );
            }
        }

        return $attachments;
    }
468685
public static function identify(array $message) {
    self::checkClient();
    $message["type"] = "identify";
    self::validate($message, "identify");

    return self::$client->identify($message);
  }
1305811
public function info($message, array $context = array())
    {
        if (self::isSetLogger()) {
            return self::$logger->info($message, $context);
        }

        return false;
    }
858122
public function formatMessage(array $message): string
    {
        [$level, $text, $context] = $message;
        $category = $context['category'];
        $timestamp = $context['time'];
        $level = Logger::getLevelName($level);
        $traces = [];
        if (isset($context['trace'])) {
            foreach ($context['trace'] as $trace) {
                $traces[] = "in {$trace['file']}:{$trace['line']}";
            }
        }

        $prefix = $this->getMessagePrefix($message);

        return $this->getTime($timestamp) . " {$prefix}[$level][$category] $text"
            . (empty($traces) ? '' : "\n    " . implode("\n    ", $traces));
    }
662560
public static function i($message, $tags = array())
    {
        
		self::singleton()->log(self::INFO_LEVEL, $message, $tags);
        
    }
237110
public static function alias(array $message) {
    self::checkClient();
    $userId = !empty($message["userId"]);
    $previousId = !empty($message["previousId"]);
    self::assert($userId && $previousId, "Segment::alias() requires both userId and previousId");

    return self::$client->alias($message);
  }
1032909
public function matches(MessageReceived $message): bool
    {
        $haystack = $this->values;

        if ($haystack instanceof Collection) {
            $haystack = $haystack->toArray();
        }

        return in_array($message->getText(), $haystack, false);
    }