Blame view

sources/lib/public/iconfig.php 3.13 KB
31b7f2792   Kload   Upgrade to ownclo...
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
  <?php
  /**
   * ownCloud
   *
   * @author Bart Visscher
   * @copyright 2013 Bart Visscher bartv@thisnet.nl
   *
   * This library is free software; you can redistribute it and/or
   * modify it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE
   * License as published by the Free Software Foundation; either
   * version 3 of the License, or any later version.
   *
   * This library is distributed in the hope that it will be useful,
   * but WITHOUT ANY WARRANTY; without even the implied warranty of
   * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
   * GNU AFFERO GENERAL PUBLIC LICENSE for more details.
   *
   * You should have received a copy of the GNU Affero General Public
   * License along with this library.  If not, see <http://www.gnu.org/licenses/>.
   *
   */
  
  /**
   * Public interface of ownCloud for apps to use.
   * Config interface
   *
   */
  
  // use OCP namespace for all classes that are considered public.
  // This means that they should be used by apps instead of the internal ownCloud classes
  namespace OCP;
  
  /**
   * Access to all the configuration options ownCloud offers
   */
  interface IConfig {
  	/**
  	 * Sets a new system wide value
a293d369c   Kload   Update sources to...
39
  	 *
31b7f2792   Kload   Upgrade to ownclo...
40
  	 * @param string $key the key of the value, under which will be saved
6d9380f96   Cédric Dupont   Update sources OC...
41
  	 * @param mixed $value the value that should be stored
31b7f2792   Kload   Upgrade to ownclo...
42
  	 */
f7d878ff1   kload   [enh] Update to 7...
43
  	public function setSystemValue($key, $value);
31b7f2792   Kload   Upgrade to ownclo...
44
45
46
  
  	/**
  	 * Looks up a system wide defined value
a293d369c   Kload   Update sources to...
47
  	 *
31b7f2792   Kload   Upgrade to ownclo...
48
  	 * @param string $key the key of the value, under which it was saved
a293d369c   Kload   Update sources to...
49
  	 * @param string $default the default value to be returned if the value isn't set
31b7f2792   Kload   Upgrade to ownclo...
50
51
  	 * @return string the saved value
  	 */
a293d369c   Kload   Update sources to...
52
  	public function getSystemValue($key, $default = '');
31b7f2792   Kload   Upgrade to ownclo...
53
54
55
56
  
  
  	/**
  	 * Writes a new app wide value
a293d369c   Kload   Update sources to...
57
  	 *
31b7f2792   Kload   Upgrade to ownclo...
58
59
60
  	 * @param string $appName the appName that we want to store the value under
  	 * @param string $key the key of the value, under which will be saved
  	 * @param string $value the value that should be stored
6d9380f96   Cédric Dupont   Update sources OC...
61
  	 * @return void
31b7f2792   Kload   Upgrade to ownclo...
62
63
64
65
66
  	 */
  	public function setAppValue($appName, $key, $value);
  
  	/**
  	 * Looks up an app wide defined value
a293d369c   Kload   Update sources to...
67
  	 *
31b7f2792   Kload   Upgrade to ownclo...
68
69
  	 * @param string $appName the appName that we stored the value under
  	 * @param string $key the key of the value, under which it was saved
a293d369c   Kload   Update sources to...
70
  	 * @param string $default the default value to be returned if the value isn't set
31b7f2792   Kload   Upgrade to ownclo...
71
72
  	 * @return string the saved value
  	 */
a293d369c   Kload   Update sources to...
73
  	public function getAppValue($appName, $key, $default = '');
31b7f2792   Kload   Upgrade to ownclo...
74
75
76
77
  
  
  	/**
  	 * Set a user defined value
a293d369c   Kload   Update sources to...
78
  	 *
31b7f2792   Kload   Upgrade to ownclo...
79
80
81
82
  	 * @param string $userId the userId of the user that we want to store the value under
  	 * @param string $appName the appName that we want to store the value under
  	 * @param string $key the key under which the value is being stored
  	 * @param string $value the value that you want to store
6d9380f96   Cédric Dupont   Update sources OC...
83
  	 * @return void
31b7f2792   Kload   Upgrade to ownclo...
84
85
86
87
88
  	 */
  	public function setUserValue($userId, $appName, $key, $value);
  
  	/**
  	 * Shortcut for getting a user defined value
a293d369c   Kload   Update sources to...
89
  	 *
31b7f2792   Kload   Upgrade to ownclo...
90
91
92
  	 * @param string $userId the userId of the user that we want to store the value under
  	 * @param string $appName the appName that we stored the value under
  	 * @param string $key the key under which the value is being stored
a293d369c   Kload   Update sources to...
93
  	 * @param string $default the default value to be returned if the value isn't set
6d9380f96   Cédric Dupont   Update sources OC...
94
  	 * @return string
31b7f2792   Kload   Upgrade to ownclo...
95
  	 */
a293d369c   Kload   Update sources to...
96
  	public function getUserValue($userId, $appName, $key, $default = '');
31b7f2792   Kload   Upgrade to ownclo...
97
  }