Use autoload for \Mibew\EventDispatcher class

This commit is contained in:
Dmitriy Simushev 2013-12-26 13:40:52 +00:00
parent 22c222d3cc
commit c76dbeab05
8 changed files with 13 additions and 2 deletions

View File

@ -16,6 +16,7 @@
*/
// Import namespaces and classes of the core
use Mibew\EventDispatcher;
use Mibew\Settings;
// Initialize libraries

View File

@ -15,6 +15,8 @@
* limitations under the License.
*/
namespace Mibew;
/**
* Provide event-related functionality.
* Implements singleton pattern.

View File

@ -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 {

View File

@ -17,6 +17,7 @@
// Import namespaces and classes of the core
use Mibew\Database;
use Mibew\EventDispatcher;
use Mibew\Settings;
/**

View File

@ -17,6 +17,7 @@
// Import namespaces and classes of the core
use Mibew\Database;
use Mibew\EventDispatcher;
use Mibew\Settings;
/**

View File

@ -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)

View File

@ -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');

View File

@ -17,6 +17,7 @@
// Import namespaces and classes of the core
use Mibew\Database;
use Mibew\EventDispatcher;
use Mibew\Settings;
/**