Blame view

sources/lib/public/iconfig.php 3.11 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
41
42
43
44
45
46
47
  	 * @param string $key the key of the value, under which will be saved
  	 * @param string $value the value that should be stored
  	 * @todo need a use case for this
  	 */
  // 	public function setSystemValue($key, $value);
  
  	/**
  	 * Looks up a system wide defined value
a293d369c   Kload   Update sources to...
48
  	 *
31b7f2792   Kload   Upgrade to ownclo...
49
  	 * @param string $key the key of the value, under which it was saved
a293d369c   Kload   Update sources to...
50
  	 * @param string $default the default value to be returned if the value isn't set
31b7f2792   Kload   Upgrade to ownclo...
51
52
  	 * @return string the saved value
  	 */
a293d369c   Kload   Update sources to...
53
  	public function getSystemValue($key, $default = '');
31b7f2792   Kload   Upgrade to ownclo...
54
55
56
57
  
  
  	/**
  	 * Writes a new app wide value
a293d369c   Kload   Update sources to...
58
  	 *
31b7f2792   Kload   Upgrade to ownclo...
59
60
61
62
63
64
65
66
  	 * @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
  	 */
  	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
83
84
85
86
87
  	 * @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
  	 */
  	public function setUserValue($userId, $appName, $key, $value);
  
  	/**
  	 * Shortcut for getting a user defined value
a293d369c   Kload   Update sources to...
88
  	 *
31b7f2792   Kload   Upgrade to ownclo...
89
90
91
  	 * @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...
92
  	 * @param string $default the default value to be returned if the value isn't set
31b7f2792   Kload   Upgrade to ownclo...
93
  	 */
a293d369c   Kload   Update sources to...
94
  	public function getUserValue($userId, $appName, $key, $default = '');
31b7f2792   Kload   Upgrade to ownclo...
95
  }