mirror of
				https://github.com/nerzhul/ocsms.git
				synced 2025-10-31 02:17:38 +00:00 
			
		
		
		
	Registering ContactsManager for future use
This commit is contained in:
		
							parent
							
								
									fdb5d4845a
								
							
						
					
					
						commit
						ac2f60ae9a
					
				| @ -41,15 +41,15 @@ class Application extends App { | ||||
| 		}); | ||||
| 
 | ||||
| 		/** | ||||
|          * Database Layer | ||||
|          */ | ||||
|         $container->registerService('Sms', function($c) { | ||||
|             return new Sms($c->query('ServerContainer')->getDb()); | ||||
|         }); | ||||
|         	 * Database Layer | ||||
|         	 */ | ||||
| 	        $container->registerService('Sms', function($c) { | ||||
| 	            return new Sms($c->query('ServerContainer')->getDb()); | ||||
| 	        }); | ||||
| 	 | ||||
|         $container->registerService('SmsMapper', function($c) { | ||||
|             return new SmsMapper($c->query('ServerContainer')->getDb()); | ||||
|         }); | ||||
| 	        $container->registerService('SmsMapper', function($c) { | ||||
| 	            return new SmsMapper($c->query('ServerContainer')->getDb()); | ||||
| 	        }); | ||||
| 
 | ||||
| 		/** | ||||
| 		 * Core | ||||
| @ -58,5 +58,12 @@ class Application extends App { | ||||
| 			return \OCP\User::getUser(); | ||||
| 		}); | ||||
| 		 | ||||
| 		/** | ||||
| 		 * Managers | ||||
| 		 */ | ||||
| 		$container->registerService('ContactsManager', function($c){ | ||||
| 			return $c->getServer()->getContactsManager(); | ||||
| 		}); | ||||
| 
 | ||||
| 	} | ||||
| } | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user