Файловый менеджер - Редактировать - /var/www/html/Entity.zip
Ðазад
PK ! ��pi� � StatsdData.phpnu ��̗� <?php namespace Liuggio\StatsdClient\Entity; use Liuggio\StatsdClient\Entity\StatsdDataInterface; class StatsdData implements StatsdDataInterface { private $key; private $value; private $metric; private $sampleRate = 1; /** * @param string $key */ public function setKey($key) { $this->key = $key; } /** * @return string */ public function getKey() { return $this->key; } /** * @param int $value */ public function setValue($value) { $this->value = $value; } /** * @return int */ public function getValue() { return $this->value; } public function setMetric($metric) { $this->metric = $metric; } public function getMetric() { return $this->metric; } /** * @param float $sampleRate */ public function setSampleRate($sampleRate) { $this->sampleRate = $sampleRate; } /** * @return float */ public function getSampleRate() { return $this->sampleRate; } /** * @param bool $withMetric * * @return string */ public function getMessage($withMetric = true) { if (!$withMetric) { $result = sprintf('%s:%s', $this->getKey(), $this->getValue()); } else { $result = sprintf('%s:%s|%s', $this->getKey(), $this->getValue(), $this->getMetric()); } $sampleRate = $this->getSampleRate(); if($sampleRate < 1){ $result.= "|@$sampleRate"; } return $result; } /** * @return string */ public function __toString() { return $this->getMessage(); } } PK ! ���� � StatsdDataInterface.phpnu ��̗� <?php namespace Liuggio\StatsdClient\Entity; interface StatsdDataInterface { CONST STATSD_METRIC_TIMING = 'ms'; CONST STATSD_METRIC_GAUGE = 'g'; CONST STATSD_METRIC_SET = 's'; CONST STATSD_METRIC_COUNT = 'c'; /** * @abstract * @return string */ function getKey(); /** * @abstract * @return mixed */ function getValue(); /** * @abstract * @return string */ function getMetric(); /** * @abstract * @return string */ function getMessage(); /** * @abstract * @return float */ function getSampleRate(); /** * @abstract * @return string */ function __toString(); } PK ! ��pi� � StatsdData.phpnu ��̗� PK ! ���� � " StatsdDataInterface.phpnu ��̗� PK � ?
| ver. 1.1 | |
.
| PHP 8.4.18 | Ð“ÐµÐ½ÐµÑ€Ð°Ñ†Ð¸Ñ Ñтраницы: 0 |
proxy
|
phpinfo
|
ÐаÑтройка