diff --git a/src/mibew/cron.php b/src/mibew/cron.php index c7400805..97664772 100644 --- a/src/mibew/cron.php +++ b/src/mibew/cron.php @@ -16,6 +16,7 @@ */ // Import namespaces and classes of the core +use Mibew\EventDispatcher; use Mibew\Settings; // Initialize libraries diff --git a/src/mibew/libs/classes/event_dispatcher.php b/src/mibew/libs/classes/Mibew/EventDispatcher.php similarity index 99% rename from src/mibew/libs/classes/event_dispatcher.php rename to src/mibew/libs/classes/Mibew/EventDispatcher.php index 3fdfb14e..70038fd2 100644 --- a/src/mibew/libs/classes/event_dispatcher.php +++ b/src/mibew/libs/classes/Mibew/EventDispatcher.php @@ -15,6 +15,8 @@ * limitations under the License. */ +namespace Mibew; + /** * Provide event-related functionality. * Implements singleton pattern. diff --git a/src/mibew/libs/classes/request_processor.php b/src/mibew/libs/classes/request_processor.php index 0e31fe6c..e4b8df27 100644 --- a/src/mibew/libs/classes/request_processor.php +++ b/src/mibew/libs/classes/request_processor.php @@ -17,6 +17,7 @@ // Import namespaces and classes of the core use Mibew\Database; +use Mibew\EventDispatcher; /** * Implements abstract class for request processing @@ -256,7 +257,7 @@ abstract class RequestProcessor { * @return mixed request result or boolean false on failure. */ public function call($functions, $async, $callback = null) { - // Get an instance of the EventDispatcher class + // Get an instance of the \Mibew\EventDispatcher class $dispatcher = EventDispatcher::getInstance(); // Try to call function at Other side try { diff --git a/src/mibew/libs/classes/thread.php b/src/mibew/libs/classes/thread.php index 81340fb0..58bfc0e3 100644 --- a/src/mibew/libs/classes/thread.php +++ b/src/mibew/libs/classes/thread.php @@ -17,6 +17,7 @@ // Import namespaces and classes of the core use Mibew\Database; +use Mibew\EventDispatcher; use Mibew\Settings; /** diff --git a/src/mibew/libs/classes/users_processor.php b/src/mibew/libs/classes/users_processor.php index fb780a6a..ce4e2b12 100644 --- a/src/mibew/libs/classes/users_processor.php +++ b/src/mibew/libs/classes/users_processor.php @@ -17,6 +17,7 @@ // Import namespaces and classes of the core use Mibew\Database; +use Mibew\EventDispatcher; use Mibew\Settings; /** diff --git a/src/mibew/libs/common/response.php b/src/mibew/libs/common/response.php index a0e0464d..fd763990 100644 --- a/src/mibew/libs/common/response.php +++ b/src/mibew/libs/common/response.php @@ -15,6 +15,11 @@ * limitations under the License. */ + +// Import namespaces and classes of the core +use Mibew\EventDispatcher; + +// Initialize libraries require_once(MIBEW_FS_ROOT.'/libs/common/locale.php'); function get_popup($href, $jshref, $message, $title, $wndName, $options) diff --git a/src/mibew/libs/init.php b/src/mibew/libs/init.php index 9693ed13..57424984 100644 --- a/src/mibew/libs/init.php +++ b/src/mibew/libs/init.php @@ -37,7 +37,6 @@ require_once(MIBEW_FS_ROOT.'/libs/common/autoload.php'); spl_autoload_register('class_autoload'); // Include system classes -require_once(MIBEW_FS_ROOT.'/libs/classes/event_dispatcher.php'); require_once(MIBEW_FS_ROOT.'/libs/classes/plugin_manager.php'); require_once(MIBEW_FS_ROOT.'/libs/classes/plugin.php'); diff --git a/src/mibew/libs/operator.php b/src/mibew/libs/operator.php index 182acfc6..7d0008fb 100644 --- a/src/mibew/libs/operator.php +++ b/src/mibew/libs/operator.php @@ -17,6 +17,7 @@ // Import namespaces and classes of the core use Mibew\Database; +use Mibew\EventDispatcher; use Mibew\Settings; /**