namespacing: \Shaarli\Router

Signed-off-by: VirtualTam <virtualtam@flibidi.net>
This commit is contained in:
VirtualTam 2018-12-04 00:02:17 +01:00
parent 9778a1551c
commit a932f486f2
14 changed files with 42 additions and 30 deletions

View File

@ -1,4 +1,5 @@
<?php
namespace Shaarli;
/**
* Class Router

View File

@ -63,12 +63,10 @@ require_once 'application/http/HttpUtils.php';
require_once 'application/http/UrlUtils.php';
require_once 'application/updater/UpdaterUtils.php';
require_once 'application/FileUtils.php';
require_once 'application/History.php';
require_once 'application/NetscapeBookmarkUtils.php';
require_once 'application/TimeZone.php';
require_once 'application/Utils.php';
require_once 'application/PluginManager.php';
require_once 'application/Router.php';
use \Shaarli\ApplicationUtils;
use \Shaarli\Bookmark\Exception\LinkNotFoundException;
@ -80,6 +78,7 @@ use \Shaarli\History;
use \Shaarli\Languages;
use \Shaarli\Render\PageBuilder;
use \Shaarli\Render\ThemeUtils;
use \Shaarli\Router;
use \Shaarli\Security\LoginManager;
use \Shaarli\Security\SessionManager;
use \Shaarli\Thumbnailer;

View File

@ -5,6 +5,8 @@
* Adds the addlink input on the linklist page.
*/
use Shaarli\Router;
/**
* When linklist is displayed, add play videos to header's toolbar.
*

View File

@ -15,6 +15,7 @@
*/
use Shaarli\Config\ConfigManager;
use Shaarli\Router;
/**
* In the footer hook, there is a working example of a translation extension for Shaarli.

View File

@ -5,6 +5,7 @@
*/
use Shaarli\Config\ConfigManager;
use Shaarli\Router;
/**
* Display an error everywhere if the plugin is enabled without configuration.

View File

@ -7,6 +7,7 @@
*/
use Shaarli\Config\ConfigManager;
use Shaarli\Router;
/*
* If this tag is used on a shaare, the description won't be processed by Parsedown.

View File

@ -6,6 +6,8 @@
* Note: this plugin adds jQuery.
*/
use Shaarli\Router;
/**
* When linklist is displayed, add play videos to header's toolbar.
*

View File

@ -12,6 +12,7 @@
use pubsubhubbub\publisher\Publisher;
use Shaarli\Config\ConfigManager;
use Shaarli\Feed\FeedBuilder;
use Shaarli\Router;
/**
* Plugin init function - set the hub to the default appspot one.

View File

@ -5,6 +5,8 @@
* Display a QRCode icon in link list.
*/
use Shaarli\Router;
/**
* Add qrcode icon to link_plugin when rendering linklist.
*

View File

@ -1,15 +1,10 @@
<?php
/**
* Router tests
*/
require_once 'application/Router.php';
namespace Shaarli;
/**
* Unit tests for Router
*/
class RouterTest extends PHPUnit_Framework_TestCase
class RouterTest extends \PHPUnit\Framework\TestCase
{
/**
* Test findPage: login page output.

View File

@ -4,6 +4,8 @@
* PluginPlayvideosTest.php
*/
use Shaarli\Router;
require_once 'plugins/addlink_toolbar/addlink_toolbar.php';
require_once 'application/Router.php';

View File

@ -4,6 +4,8 @@
* PluginPlayvideosTest.php
*/
use Shaarli\Router;
require_once 'plugins/playvideos/playvideos.php';
require_once 'application/Router.php';

View File

@ -1,5 +1,6 @@
<?php
use Shaarli\Config\ConfigManager;
use Shaarli\Router;
require_once 'plugins/pubsubhubbub/pubsubhubbub.php';
require_once 'application/Router.php';

View File

@ -3,6 +3,8 @@
* PluginQrcodeTest.php
*/
use Shaarli\Router;
require_once 'plugins/qrcode/qrcode.php';
require_once 'application/Router.php';