diff options
author | Robin Appelman <icewind@owncloud.com> | 2014-09-04 01:10:02 +0200 |
---|---|---|
committer | Robin Appelman <icewind@owncloud.com> | 2014-09-04 13:26:51 +0200 |
commit | fa3393674c854e884abf10d3b82dab03aca83c61 (patch) | |
tree | 0560b9ec8bf3ff28fb6cea81bfe4255f48e7157d | |
parent | 8605e2e6a5ac637ed552d9469f3dc31717b4ea3e (diff) | |
download | nextcloud-server-fa3393674c854e884abf10d3b82dab03aca83c61.tar.gz nextcloud-server-fa3393674c854e884abf10d3b82dab03aca83c61.zip |
Better phpdoc and method naming
-rw-r--r-- | apps/files/ajax/newfile.php | 2 | ||||
-rw-r--r-- | apps/files/ajax/scan.php | 2 | ||||
-rw-r--r-- | core/ajax/update.php | 2 | ||||
-rw-r--r-- | lib/private/appframework/core/api.php | 2 | ||||
-rw-r--r-- | lib/private/server.php | 4 | ||||
-rw-r--r-- | lib/public/ieventsource.php | 2 | ||||
-rw-r--r-- | lib/public/iservercontainer.php | 4 |
7 files changed, 10 insertions, 8 deletions
diff --git a/apps/files/ajax/newfile.php b/apps/files/ajax/newfile.php index 1070246fca9..46629e1b602 100644 --- a/apps/files/ajax/newfile.php +++ b/apps/files/ajax/newfile.php @@ -16,7 +16,7 @@ $content = isset( $_REQUEST['content'] ) ? $_REQUEST['content'] : ''; $source = isset( $_REQUEST['source'] ) ? trim($_REQUEST['source'], '/\\') : ''; if($source) { - $eventSource = \OC::$server->getEventSource(); + $eventSource = \OC::$server->createEventSource(); } else { OC_JSON::callCheck(); } diff --git a/apps/files/ajax/scan.php b/apps/files/ajax/scan.php index eed620113ac..da5a2ce6f26 100644 --- a/apps/files/ajax/scan.php +++ b/apps/files/ajax/scan.php @@ -15,7 +15,7 @@ if (isset($_GET['users'])) { $users = array(OC_User::getUser()); } -$eventSource = \OC::$server->getEventSource(); +$eventSource = \OC::$server->createEventSource(); $listener = new ScanListener($eventSource); foreach ($users as $user) { diff --git a/core/ajax/update.php b/core/ajax/update.php index 89ce2798378..2a586535e70 100644 --- a/core/ajax/update.php +++ b/core/ajax/update.php @@ -4,7 +4,7 @@ require_once '../../lib/base.php'; if (OC::checkUpgrade(false)) { $l = new \OC_L10N('core'); - $eventSource = \OC::$server->getEventSource(); + $eventSource = \OC::$server->createEventSource(); $updater = new \OC\Updater(\OC_Log::$object); $updater->listen('\OC\Updater', 'maintenanceStart', function () use ($eventSource, $l) { $eventSource->send('success', (string)$l->t('Turned on maintenance mode')); diff --git a/lib/private/appframework/core/api.php b/lib/private/appframework/core/api.php index 0dd3a583868..279f4bf97f7 100644 --- a/lib/private/appframework/core/api.php +++ b/lib/private/appframework/core/api.php @@ -114,7 +114,7 @@ class API implements IApi{ * @return \OCP\IEventSource a new open EventSource class */ public function openEventSource(){ - return \OC::$server->getEventSource(); + return \OC::$server->createEventSource(); } /** diff --git a/lib/private/server.php b/lib/private/server.php index 1c3b1b03ce9..0c663e8553a 100644 --- a/lib/private/server.php +++ b/lib/private/server.php @@ -494,11 +494,11 @@ class Server extends SimpleContainer implements IServerContainer { } /** - * Returns a search instance + * Create a new event source * * @return \OCP\IEventSource */ - function getEventSource() { + function createEventSource() { return new \OC_EventSource(); } } diff --git a/lib/public/ieventsource.php b/lib/public/ieventsource.php index ea4bfc73d42..eb7853c5e90 100644 --- a/lib/public/ieventsource.php +++ b/lib/public/ieventsource.php @@ -13,6 +13,8 @@ namespace OCP; * includes a fallback for older browsers and IE * * use server side events with caution, to many open requests can hang the server + * + * The event source will initialize the connection to the client when the first data is sent */ interface IEventSource { /** diff --git a/lib/public/iservercontainer.php b/lib/public/iservercontainer.php index 24d8894d9fe..1abf0d9938d 100644 --- a/lib/public/iservercontainer.php +++ b/lib/public/iservercontainer.php @@ -237,9 +237,9 @@ interface IServerContainer { function getCertificateManager($user = null); /** - * Returns a search instance + * Create a new event source * * @return \OCP\IEventSource */ - function getEventSource(); + function createEventSource(); } |