<?php

namespace Nitrapi\Services\Voiceservers;


class VoiceserverDetails
{
    protected $data;

    public function __construct(array &$data) {
        $this->data = $data;
    }

    public function getIP() {
        return (string)$this->data['ip'];
    }

    public function getPort() {
        return (int)$this->data['port'];
    }

    public function getSlots() {
        return (int)$this->data['slots'];
    }
}
<?php

namespace Nitrapi\Services\Voiceservers;


class VoiceserverDetails
{
    protected $data;

    public function __construct(array &$data) {
        $this->data = $data;
    }

    public function getType() {
        return (string)$this->data['type'];
    }

    public function getIP() {
        return (string)$this->data['ip'];
    }

    public function isStarted() {
        return (bool)$this->data['started'];
    }

    public function isStopped() {
        return !$this->$this->isStarted();
    }

    public function getPort() {
        return (int)$this->data['port'];
    }

    public function getSlots() {
        return (int)$this->data['slots'];
    }
}
Update Wed Mar 2 13:31:00 CET 2016
Update Wed Mar  2 13:31:00 CET 2016
