1
0
mirror of https://github.com/nextcloud/ocsms.git synced 2026-08-21 21:32:59 +00:00

Prepare buffer for contacts

This commit is contained in:
Ner'zhul
2014-09-29 12:45:45 +02:00
parent ac2f60ae9a
commit 8cca1ed0f8
+12 -1
View File
@@ -21,6 +21,11 @@ use \OCA\OcSms\Db\SmsMapper;
class Application extends App {
/**
* @var array used to cache the parsed contacts for every request
*/
private static $contacts;
public function __construct (array $urlParams=array()) {
parent::__construct('ocsms', $urlParams);
@@ -64,6 +69,12 @@ class Application extends App {
$container->registerService('ContactsManager', function($c){
return $c->getServer()->getContactsManager();
});
}
// Partially importe this function from owncloud Chat app
public function getContacts() {
// Only load contacts if they aren't in the buffer
if(count(self::$contacts) == 0){
}
}
}