for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace CarlosIO\Geckoboard\Widgets;
/**
* Class Monitoring.
*/
class Monitoring extends Widget
{
const STATUS_UP = 'Up';
const STATUS_DOWN = 'Down';
* @var string
protected $status;
protected $downTime;
protected $responseTime;
* @param $status
*
* @return $this
public function setStatus($status)
if ($status !== self::STATUS_UP && $status !== self::STATUS_DOWN) {
$message = "Value '%s' must be ".self::STATUS_UP.' or '.self::STATUS_DOWN;
throw new \InvalidArgumentException(sprintf($message, $status));
}
$this->status = $status;
return $this;
* @param $downtime
public function setDownTime($downtime)
$this->downTime = $downtime;
* @param $responseTime
public function setResponseTime($responseTime)
$this->responseTime = $responseTime;
* @return string
public function getStatus()
return $this->status;
public function getDownTime()
return $this->downTime;
public function getResponseTime()
return $this->responseTime;
* @return array
public function getData()
return array(
'status' => $this->getStatus(),
'downTime' => $this->getDownTime(),
'responseTime' => $this->getResponseTime(),
);