2014-09-07 11:26:12 +12:00
|
|
|
<?php
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @package docsviewer
|
|
|
|
*/
|
|
|
|
class DocumentationEntityLanguage extends ViewableData {
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @var string
|
|
|
|
*/
|
|
|
|
protected $language;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @var DocumentationEntityVersion
|
|
|
|
*/
|
|
|
|
protected $entity;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @param DocumentationEntityVersion $version
|
|
|
|
* @param string $language
|
|
|
|
*/
|
|
|
|
public function __construct(DocumentationEntityVersion $version, $language) {
|
|
|
|
$this->entity = $version;
|
|
|
|
$this->language = $language;
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @return string
|
|
|
|
*/
|
|
|
|
public function Link() {
|
2014-09-07 17:09:28 +12:00
|
|
|
return Controller::join_links(
|
|
|
|
$this->entity->Link(), $this->language
|
|
|
|
);
|
2014-09-07 11:26:12 +12:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
2014-09-07 20:35:08 +12:00
|
|
|
* @return DocumentationEntityVersion
|
2014-09-07 11:26:12 +12:00
|
|
|
*/
|
|
|
|
public function getVersion() {
|
2014-09-07 20:35:08 +12:00
|
|
|
return $this->entity;
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @return array
|
|
|
|
*/
|
|
|
|
public function getVersions() {
|
|
|
|
return $this->entity->getEntity()->getVersions();
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @return
|
|
|
|
*/
|
|
|
|
public function getStableVersion() {
|
|
|
|
return $this->entity->getEntity()->getStableVersion();
|
2014-09-07 11:26:12 +12:00
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @return string
|
|
|
|
*/
|
|
|
|
public function getLanguage() {
|
|
|
|
return $this->language;
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @return string
|
|
|
|
*/
|
|
|
|
public function getPath() {
|
|
|
|
return Controller::join_links($this->entity->getPath(), $this->language);
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @return string
|
|
|
|
*/
|
|
|
|
public function getBasePath() {
|
|
|
|
return $this->entity->getPath();
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @return string
|
|
|
|
*/
|
|
|
|
public function getTitle() {
|
|
|
|
return $this->entity->getTitle();
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @return string
|
|
|
|
*/
|
|
|
|
public function getBaseFolder() {
|
|
|
|
return $this->entity->getBaseFolder();
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @return array
|
|
|
|
*/
|
|
|
|
public function getSupportedLanguages() {
|
|
|
|
return $this->entity->getSupportedLanguages();
|
|
|
|
}
|
|
|
|
}
|