| 
									
										
										
										
											2018-04-10 20:30:11 +02:00
										 |  |  | <?php | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2018-04-11 19:49:35 +02:00
										 |  |  | namespace Grocy\Services; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | class ApplicationService extends BaseService | 
					
						
							| 
									
										
										
										
											2018-04-10 20:30:11 +02:00
										 |  |  | { | 
					
						
							| 
									
										
										
										
											2018-04-11 19:49:35 +02:00
										 |  |  | 	private $InstalledVersion; | 
					
						
							|  |  |  | 	public function GetInstalledVersion() | 
					
						
							| 
									
										
										
										
											2018-04-10 20:30:11 +02:00
										 |  |  | 	{ | 
					
						
							| 
									
										
										
										
											2018-04-11 19:49:35 +02:00
										 |  |  | 		if ($this->InstalledVersion == null) | 
					
						
							| 
									
										
										
										
											2018-04-10 20:30:11 +02:00
										 |  |  | 		{ | 
					
						
							| 
									
										
										
										
											2018-05-12 15:49:21 +02:00
										 |  |  | 			$this->InstalledVersion = json_decode(file_get_contents(__DIR__ . '/../version.json')); | 
					
						
							| 
									
										
										
										
											2018-04-10 20:30:11 +02:00
										 |  |  | 		} | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2018-04-11 19:49:35 +02:00
										 |  |  | 		return $this->InstalledVersion; | 
					
						
							| 
									
										
										
										
											2018-04-10 20:30:11 +02:00
										 |  |  | 	} | 
					
						
							|  |  |  | } |