1: 2: 3: 4: 5: 6: 7: 8: 9: 10: 11: 12: 13: 14: 15: 16: 17: 18: 19: 20: 21: 22: 23: 24: 25: 26: 27: 28: 29: 30: 31: 32: 33: 34: 35: 36: 37: 38: 39: 40: 41: 42: 43: 44: 45: 46: 47: 48: 49: 50: 51: 52: 53: 54: 55: 56: 57: 58: 59: 60: 61: 62: 63: 64: 65: 66: 67: 68: 69: 70: 71: 72: 73: 74: 75: 76: 77: 78:
<?php
/**
* FlexiPeeHP - FlexiBee Server Status class.
*
* @author Vítězslav Dvořák <vitex@arachne.cz>
* @copyright (C) 2016-2017 Spoje.Net
*/
namespace FlexiPeeHP;
/**
* Description of Status
*
* @author vitex
*/
class Status extends FlexiBeeRO
{
/**
* Evidence užitá objektem.
* Evidence used by object
*
* @link https://demo.flexibee.eu/c/demo/evidence-list Přehled evidencí
* @var string
*/
public $evidence = 'status';
/**
* @link https://demo.flexibee.eu/devdoc/company-identifier Identifikátor firmy
* @var string
*/
public $company = '';
/**
* Default Line Prefix.
*
* @var string
*/
public $prefix = '';
/**
* FlexiBee status
*
* @param mixed $init mostly ignored
* @param array $options not used at all
*/
public function __construct($init = null, $options = [])
{
parent::__construct($init, $options);
$this->takeData($this->getFlexiData('/'.$this->evidence));
}
/**
* Return the same response format for one and multiplete results
*
* @param array $responseRaw
* @return array
*/
public function unifyResponseFormat($responseRaw)
{
if (array_key_exists('status', $responseRaw)) {
$response = $responseRaw['status'];
} else {
$response = $responseRaw;
}
return $response;
}
/**
* Status has no relations
*
* @return null
*/
public function getVazby($id = null)
{
throw new \Exception(_('Status has no relations'));
}
}