defaults.php 3.6 KB

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