system.php 613 Bytes
<?php
class Flora_Api_Response_System
{
	/**
	 * @var \Flora_Api_Response
	 */
	protected $response;

	public function __construct(Flora_Api_Response $response)
	{
		$this->response = $response;
	}

	protected function getSystemVar($var)
	{
		/** @noinspection PhpUndefinedFieldInspection */
		return $this->response->getResponseObject()->system->$var;
	}

	public function getApiVersion()
	{
		return $this->getSystemVar("version");
	}

	public function getApiVersionUrl()
	{
		return $this->getSystemVar("versionurl");
	}

	public function getApiLastUpdate()
	{
		return $this->getSystemVar("lastupdate");
	}
}