| 
									
										
										
										
											2014-03-28 22:14:51 +03:00
										 |  |  | <?php | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | /** | 
					
						
							|  |  |  |  * ownCloud - Documents App | 
					
						
							|  |  |  |  * | 
					
						
							|  |  |  |  * @author Victor Dubiniuk | 
					
						
							|  |  |  |  * @copyright 2014 Victor Dubiniuk victor.dubiniuk@gmail.com | 
					
						
							|  |  |  |  * | 
					
						
							|  |  |  |  * This file is licensed under the Affero General Public License version 3 or | 
					
						
							|  |  |  |  * later. | 
					
						
							|  |  |  |  */ | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | namespace OCA\Documents; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | class Config { | 
					
						
							|  |  |  | 	const APP_NAME = 'documents'; | 
					
						
							|  |  |  | 	 | 
					
						
							| 
									
										
										
										
											2014-04-09 17:48:48 +03:00
										 |  |  | 	public static function getL10n(){ | 
					
						
							|  |  |  | 		return \OCP\Util::getL10N(self::APP_NAME); | 
					
						
							|  |  |  | 	} | 
					
						
							|  |  |  | 	 | 
					
						
							| 
									
										
										
										
											2014-03-28 22:14:51 +03:00
										 |  |  | 	public static function getConverter(){ | 
					
						
							|  |  |  | 		return self::getAppValue('converter', 'local'); | 
					
						
							|  |  |  | 	} | 
					
						
							|  |  |  | 	 | 
					
						
							|  |  |  | 	public static function setConverter($value){ | 
					
						
							|  |  |  | 		return self::setAppValue('converter', $value); | 
					
						
							|  |  |  | 	} | 
					
						
							|  |  |  | 	 | 
					
						
							|  |  |  | 	public static function getConverterUrl(){ | 
					
						
							|  |  |  | 		return self::getAppValue('converter_url', 'http://localhost:16080'); | 
					
						
							|  |  |  | 	} | 
					
						
							|  |  |  | 	 | 
					
						
							|  |  |  | 	public static function setConverterUrl($value){ | 
					
						
							|  |  |  | 		return self::setAppValue('converter_url', $value); | 
					
						
							|  |  |  | 	} | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 	protected static function getAppValue($key, $default){ | 
					
						
							|  |  |  | 		return \OCP\Config::getAppValue(self::APP_NAME, $key, $default); | 
					
						
							|  |  |  | 	} | 
					
						
							|  |  |  | 	 | 
					
						
							|  |  |  | 	protected static function setAppValue($key, $value){ | 
					
						
							|  |  |  | 		return \OCP\Config::setAppValue(self::APP_NAME, $key, $value); | 
					
						
							|  |  |  | 	} | 
					
						
							|  |  |  | 	 | 
					
						
							|  |  |  | } |