1
0

Defaults.php 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175
  1. <?php
  2. /**
  3. * @copyright Copyright (c) 2016, ownCloud, Inc.
  4. *
  5. * @author Björn Schießle <bjoern@schiessle.org>
  6. * @author Joas Schilling <coding@schilljs.com>
  7. * @author Lukas Reschke <lukas@statuscode.ch>
  8. * @author Morris Jobke <hey@morrisjobke.de>
  9. * @author scolebrook <scolebrook@mac.com>
  10. *
  11. * @license AGPL-3.0
  12. *
  13. * This code is free software: you can redistribute it and/or modify
  14. * it under the terms of the GNU Affero General Public License, version 3,
  15. * as published by the Free Software Foundation.
  16. *
  17. * This program is distributed in the hope that it will be useful,
  18. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  19. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  20. * GNU Affero General Public License for more details.
  21. *
  22. * You should have received a copy of the GNU Affero General Public License, version 3,
  23. * along with this program. If not, see <http://www.gnu.org/licenses/>
  24. *
  25. */
  26. /**
  27. * Public interface of ownCloud for apps to use.
  28. * Defaults Class
  29. *
  30. */
  31. // use OCP namespace for all classes that are considered public.
  32. // This means that they should be used by apps instead of the internal ownCloud classes
  33. namespace OCP;
  34. /**
  35. * public api to access default strings and urls for your templates
  36. * @since 6.0.0
  37. */
  38. class Defaults {
  39. /**
  40. * \OC_Defaults instance to retrieve the defaults
  41. * @return string
  42. * @since 6.0.0
  43. */
  44. private $defaults;
  45. /**
  46. * creates a \OC_Defaults instance which is used in all methods to retrieve the
  47. * actual defaults
  48. * @since 6.0.0
  49. */
  50. function __construct() {
  51. $this->defaults = \OC::$server->getThemingDefaults();
  52. }
  53. /**
  54. * get base URL for the organisation behind your ownCloud instance
  55. * @return string
  56. * @since 6.0.0
  57. */
  58. public function getBaseUrl() {
  59. return $this->defaults->getBaseUrl();
  60. }
  61. /**
  62. * link to the desktop sync client
  63. * @return string
  64. * @since 6.0.0
  65. */
  66. public function getSyncClientUrl() {
  67. return $this->defaults->getSyncClientUrl();
  68. }
  69. /**
  70. * link to the iOS client
  71. * @return string
  72. * @since 8.0.0
  73. */
  74. public function getiOSClientUrl() {
  75. return $this->defaults->getiOSClientUrl();
  76. }
  77. /**
  78. * link to the Android client
  79. * @return string
  80. * @since 8.0.0
  81. */
  82. public function getAndroidClientUrl() {
  83. return $this->defaults->getAndroidClientUrl();
  84. }
  85. /**
  86. * base URL to the documentation of your ownCloud instance
  87. * @return string
  88. * @since 6.0.0
  89. */
  90. public function getDocBaseUrl() {
  91. return $this->defaults->getDocBaseUrl();
  92. }
  93. /**
  94. * name of your ownCloud instance
  95. * @return string
  96. * @since 6.0.0
  97. */
  98. public function getName() {
  99. return $this->defaults->getName();
  100. }
  101. /**
  102. * name of your ownCloud instance containing HTML styles
  103. * @return string
  104. * @since 8.0.0
  105. */
  106. public function getHTMLName() {
  107. return $this->defaults->getHTMLName();
  108. }
  109. /**
  110. * Entity behind your onwCloud instance
  111. * @return string
  112. * @since 6.0.0
  113. */
  114. public function getEntity() {
  115. return $this->defaults->getEntity();
  116. }
  117. /**
  118. * ownCloud slogan
  119. * @return string
  120. * @since 6.0.0
  121. */
  122. public function getSlogan() {
  123. return $this->defaults->getSlogan();
  124. }
  125. /**
  126. * logo claim
  127. * @return string
  128. * @since 6.0.0
  129. */
  130. public function getLogoClaim() {
  131. return $this->defaults->getLogoClaim();
  132. }
  133. /**
  134. * footer, short version
  135. * @return string
  136. * @since 6.0.0
  137. */
  138. public function getShortFooter() {
  139. return $this->defaults->getShortFooter();
  140. }
  141. /**
  142. * footer, long version
  143. * @return string
  144. * @since 6.0.0
  145. */
  146. public function getLongFooter() {
  147. return $this->defaults->getLongFooter();
  148. }
  149. /**
  150. * Returns the AppId for the App Store for the iOS Client
  151. * @return string AppId
  152. * @since 8.0.0
  153. */
  154. public function getiTunesAppId() {
  155. return $this->defaults->getiTunesAppId();
  156. }
  157. }