Moved current Router files to API

- updated Unit tests to reflect the change
This commit is contained in:
Jonathan Labreuille
2016-07-28 17:04:34 +02:00
parent 008fdb94c5
commit 354d249e1d
23 changed files with 48 additions and 33 deletions

View File

@@ -4,6 +4,7 @@ namespace MailPoet\Config;
use MailPoet\Models;
use MailPoet\Cron\Supervisor;
use MailPoet\Router;
use MailPoet\API;
use MailPoet\WP\Notice as WPNotice;
if(!defined('ABSPATH')) exit;
@@ -120,11 +121,7 @@ class Initializer {
}
try {
// legacy router
$this->setupRouter();
// new api (will replace legacy router completely)
$this->setupAPI();
$this->setupFrontRouter();
$this->setupPages();
} catch(\Exception $e) {
@@ -160,11 +157,6 @@ class Initializer {
$menu->init();
}
function setupRouter() {
$router = new Router\Router();
$router->init();
}
function setupAnalytics() {
$analytics = new Analytics();
$analytics->init();
@@ -191,7 +183,8 @@ class Initializer {
}
function setupAPI() {
$api = new API\API();
$api->init();
}
function setupFrontRouter() {