Skip to content

Commit

Permalink
Improve code documentation for Routing
Browse files Browse the repository at this point in the history
  • Loading branch information
rougin committed Dec 10, 2023
1 parent 44ae6a3 commit 11f464b
Show file tree
Hide file tree
Showing 29 changed files with 131 additions and 120 deletions.
8 changes: 4 additions & 4 deletions src/Container/LeagueContainer.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,19 @@

namespace Rougin\Slytherin\Container;

use League\Container\Container as BaseContainer;
use League\Container\Container as League;

/**
* League Container
*
* A simple implementation of a container that is based on League\Container.
*
* http://container.thephpleague.com
*
* @package Slytherin
* @author Rougin Gutib <rougingutib@gmail.com>
*
* @link http://container.thephpleague.com
*/
class LeagueContainer extends BaseContainer implements ContainerInterface
class LeagueContainer extends League implements ContainerInterface
{
/**
* Sets a new instance to the container.
Expand Down
7 changes: 3 additions & 4 deletions src/Dispatching/BaseRouter.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,16 @@

namespace Rougin\Slytherin\Dispatching;

use Rougin\Slytherin\Routing\Router as AbstractRouter;
use Rougin\Slytherin\Routing\Router as Slytherin;

/**
* Base Router
*
* A simple implementation of a router that is based on RouterInterface.
* NOTE: To be removed in v1.0.0
* NOTE: To be removed in v1.0.0. Use "Routing\Router" instead.
*
* @package Slytherin
* @author Rougin Gutib <rougingutib@gmail.com>
*/
abstract class BaseRouter extends AbstractRouter
abstract class BaseRouter extends Slytherin
{
}
7 changes: 3 additions & 4 deletions src/Dispatching/Dispatcher.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,16 @@

namespace Rougin\Slytherin\Dispatching;

use Rougin\Slytherin\Dispatching\Vanilla\Dispatcher as BaseDispatcher;
use Rougin\Slytherin\Dispatching\Vanilla\Dispatcher as Slytherin;

/**
* Dispatcher
*
* A simple implementation of a route dispatcher that is based on DispatcherInterface.
* NOTE: To be removed in v1.0.0. Use "Routing\Dispatcher" instead.
* NOTE: To be removed in v1.0.0. Use "Vanilla\Dispatcher" instead.
*
* @package Slytherin
* @author Rougin Gutib <rougingutib@gmail.com>
*/
class Dispatcher extends BaseDispatcher
class Dispatcher extends Slytherin
{
}
5 changes: 2 additions & 3 deletions src/Dispatching/DispatcherInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,16 @@

namespace Rougin\Slytherin\Dispatching;

use Rougin\Slytherin\Routing\DispatcherInterface as BaseDispatcher;
use Rougin\Slytherin\Routing\DispatcherInterface as Slytherin;

/**
* Dispatcher Interface
*
* An interface for handling third-party route dispatchers.
* NOTE: To be removed in v1.0.0. Use "Routing\DispatcherInterface" instead.
*
* @package Slytherin
* @author Rougin Gutib <rougingutib@gmail.com>
*/
interface DispatcherInterface extends BaseDispatcher
interface DispatcherInterface extends Slytherin
{
}
9 changes: 3 additions & 6 deletions src/Dispatching/FastRoute/Dispatcher.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,16 @@

namespace Rougin\Slytherin\Dispatching\FastRoute;

use Rougin\Slytherin\Routing\FastRoute\Dispatcher as BaseDispatcher;
use Rougin\Slytherin\Routing\FastRoute\Dispatcher as Slytherin;

/**
* FastRoute Dispatcher
*
* A simple implementation of dispatcher that is built on top of FastRoute.
* NOTE: To be removed in v1.0.0. Use "Routing\FastRouteDispatcher" instead.
*
* https://github.com/nikic/FastRoute
* NOTE: To be removed in v1.0.0. Use "Routing\FastRoute\Dispatcher" instead.
*
* @package Slytherin
* @author Rougin Gutib <rougingutib@gmail.com>
*/
class Dispatcher extends BaseDispatcher
class Dispatcher extends Slytherin
{
}
9 changes: 3 additions & 6 deletions src/Dispatching/FastRoute/Router.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,16 @@

namespace Rougin\Slytherin\Dispatching\FastRoute;

use Rougin\Slytherin\Routing\FastRoute\Router as BaseRouter;
use Rougin\Slytherin\Routing\FastRoute\Router as Slytherin;

/**
* FastRoute Router
*
* A simple implementation of router that is built on top of FastRoute.
* NOTE: To be removed in v1.0.0. Use "Routing\FastRouteRouter" instead.
*
* https://github.com/nikic/FastRoute
* NOTE: To be removed in v1.0.0. Use "Routing\FastRoute\Router" instead.
*
* @package Slytherin
* @author Rougin Gutib <rougingutib@gmail.com>
*/
class Router extends BaseRouter
class Router extends Slytherin
{
}
9 changes: 3 additions & 6 deletions src/Dispatching/Phroute/Dispatcher.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,16 @@

namespace Rougin\Slytherin\Dispatching\Phroute;

use Rougin\Slytherin\Routing\Phroute\Dispatcher as BaseDispatcher;
use Rougin\Slytherin\Routing\Phroute\Dispatcher as Slytherin;

/**
* Phroute Dispatcher
*
* A simple implementation of dispatcher that is built on top of Phroute.
* NOTE: To be removed in v1.0.0. Use "Routing\PhrouteDispatcher" instead.
*
* https://github.com/mrjgreen/phroute
* NOTE: To be removed in v1.0.0. Use "Routing\Phroute\Dispatcher" instead.
*
* @package Slytherin
* @author Rougin Gutib <rougingutib@gmail.com>
*/
class Dispatcher extends BaseDispatcher
class Dispatcher extends Slytherin
{
}
9 changes: 3 additions & 6 deletions src/Dispatching/Phroute/Router.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,16 @@

namespace Rougin\Slytherin\Dispatching\Phroute;

use Rougin\Slytherin\Routing\Phroute\Router as BaseRouter;
use Rougin\Slytherin\Routing\Phroute\Router as Slytherin;

/**
* Phroute Router
*
* A simple implementation of router that is built on top of Phroute.
* NOTE: To be removed in v1.0.0. Use "Routing\PhrouteRouter" instead.
*
* https://github.com/mrjgreen/phroute
* NOTE: To be removed in v1.0.0. Use "Routing\Phroute\Router" instead.
*
* @package Slytherin
* @author Rougin Gutib <rougingutib@gmail.com>
*/
class Router extends BaseRouter
class Router extends Slytherin
{
}
7 changes: 3 additions & 4 deletions src/Dispatching/Router.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,16 @@

namespace Rougin\Slytherin\Dispatching;

use Rougin\Slytherin\Dispatching\Vanilla\Router as VanillaRouter;
use Rougin\Slytherin\Dispatching\Vanilla\Router as Slytherin;

/**
* Dispatcher
*
* A simple implementation of a router that is based on RouterInterface.
* NOTE: To be removed in v1.0.0. Use "Routing\Router" instead.
* NOTE: To be removed in v1.0.0. Use "Vanilla\Router" instead.
*
* @package Slytherin
* @author Rougin Gutib <rougingutib@gmail.com>
*/
class Router extends VanillaRouter
class Router extends Slytherin
{
}
5 changes: 2 additions & 3 deletions src/Dispatching/RouterInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,16 @@

namespace Rougin\Slytherin\Dispatching;

use Rougin\Slytherin\Routing\RouterInterface as AbstractRouter;
use Rougin\Slytherin\Routing\RouterInterface as Slytherin;

/**
* Router Interface
*
* An interface for handling third-party routers.
* NOTE: To be removed in v1.0.0. Use "Routing\RouterInterface" instead.
*
* @package Slytherin
* @author Rougin Gutib <rougingutib@gmail.com>
*/
interface RouterInterface extends AbstractRouter
interface RouterInterface extends Slytherin
{
}
7 changes: 3 additions & 4 deletions src/Dispatching/Vanilla/Dispatcher.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,16 @@

namespace Rougin\Slytherin\Dispatching\Vanilla;

use Rougin\Slytherin\Routing\Vanilla\Dispatcher as BaseDispatcher;
use Rougin\Slytherin\Routing\Vanilla\Dispatcher as Slytherin;

/**
* Dispatcher
*
* A simple implementation of a route dispatcher that is based on DispatcherInterface.
* NOTE: To be removed in v1.0.0. Use "Routing\Dispatcher" instead.
* NOTE: To be removed in v1.0.0. Use "Routing\Vanilla\Dispatcher" instead.
*
* @package Slytherin
* @author Rougin Gutib <rougingutib@gmail.com>
*/
class Dispatcher extends BaseDispatcher
class Dispatcher extends Slytherin
{
}
7 changes: 3 additions & 4 deletions src/Dispatching/Vanilla/Router.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,16 @@

namespace Rougin\Slytherin\Dispatching\Vanilla;

use Rougin\Slytherin\Routing\Vanilla\Router as BaseRouter;
use Rougin\Slytherin\Routing\Vanilla\Router as Slytherin;

/**
* Dispatcher
*
* A simple implementation of a router that is based on RouterInterface.
* NOTE: To be removed in v1.0.0. Use "Routing\Router" instead.
* NOTE: To be removed in v1.0.0. Use "Routing\Vanilla\Router" instead.
*
* @package Slytherin
* @author Rougin Gutib <rougingutib@gmail.com>
*/
class Router extends BaseRouter
class Router extends Slytherin
{
}
3 changes: 0 additions & 3 deletions src/Routing/FastRoute/Dispatcher.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,8 @@
/**
* FastRoute Dispatcher
*
* A simple implementation of dispatcher that is built on top of FastRoute.
* NOTE: To be removed in v1.0.0. Use "Routing\FastRouteDispatcher" instead.
*
* https://github.com/nikic/FastRoute
*
* @package Slytherin
* @author Rougin Gutib <rougingutib@gmail.com>
*/
Expand Down
3 changes: 0 additions & 3 deletions src/Routing/FastRoute/Router.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,8 @@
/**
* FastRoute Router
*
* A simple implementation of router that is built on top of FastRoute.
* NOTE: To be removed in v1.0.0. Use "Routing\FastRouteRouter" instead.
*
* https://github.com/nikic/FastRoute
*
* @package Slytherin
* @author Rougin Gutib <rougingutib@gmail.com>
*/
Expand Down
4 changes: 2 additions & 2 deletions src/Routing/FastRouteDispatcher.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@
*
* A simple implementation of dispatcher that is built on top of FastRoute.
*
* https://github.com/nikic/FastRoute
*
* @package Slytherin
* @author Rougin Gutib <rougingutib@gmail.com>
*
* @link https://github.com/nikic/FastRoute
*/
class FastRouteDispatcher extends Dispatcher
{
Expand Down
4 changes: 2 additions & 2 deletions src/Routing/FastRouteRouter.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@
*
* A simple implementation of router that is built on top of FastRoute.
*
* https://github.com/nikic/FastRoute
*
* @package Slytherin
* @author Rougin Gutib <rougingutib@gmail.com>
*
* @link https://github.com/nikic/FastRoute
*/
class FastRouteRouter extends Router
{
Expand Down
3 changes: 0 additions & 3 deletions src/Routing/Phroute/Dispatcher.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,8 @@
/**
* Phroute Dispatcher
*
* A simple implementation of dispatcher that is built on top of Phroute.
* NOTE: To be removed in v1.0.0. Use "Routing\PhrouteDispatcher" instead.
*
* https://github.com/mrjgreen/phroute
*
* @package Slytherin
* @author Rougin Gutib <rougingutib@gmail.com>
*/
Expand Down
3 changes: 0 additions & 3 deletions src/Routing/Phroute/Router.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,8 @@
/**
* Phroute Router
*
* A simple implementation of router that is built on top of Phroute.
* NOTE: To be removed in v1.0.0. Use "Routing\PhrouteRouter" instead.
*
* https://github.com/mrjgreen/phroute
*
* @package Slytherin
* @author Rougin Gutib <rougingutib@gmail.com>
*/
Expand Down
4 changes: 2 additions & 2 deletions src/Routing/PhrouteDispatcher.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@
*
* A simple implementation of dispatcher that is built on top of Phroute.
*
* https://github.com/mrjgreen/phroute
*
* @package Slytherin
* @author Rougin Gutib <rougingutib@gmail.com>
*
* @link https://github.com/mrjgreen/phroute
*/
class PhrouteDispatcher extends Dispatcher
{
Expand Down
4 changes: 2 additions & 2 deletions src/Routing/PhrouteResolver.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@
*
* A handler resolver that wraps the route as the result.
*
* https://github.com/mrjgreen/phroute
*
* @package Slytherin
* @author Rougin Gutib <rougingutib@gmail.com>
*
* @link https://github.com/mrjgreen/phroute
*/
class PhrouteResolver implements HandlerResolverInterface
{
Expand Down
4 changes: 2 additions & 2 deletions src/Routing/PhrouteRouter.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@
*
* A simple implementation of router that is built on top of Phroute.
*
* https://github.com/mrjgreen/phroute
*
* @package Slytherin
* @author Rougin Gutib <rougingutib@gmail.com>
*
* @link https://github.com/mrjgreen/phroute
*/
class PhrouteRouter extends Router
{
Expand Down
6 changes: 4 additions & 2 deletions src/Routing/PhrouteWrapper.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,14 @@
namespace Rougin\Slytherin\Routing;

/**
* A simple class wrapper for resolving routes in Phroute.
* Phroute Wrapper
*
* https://github.com/mrjgreen/phroute
* A simple class wrapper for resolving routes in Phroute.
*
* @package Slytherin
* @author Rougin Gutib <rougingutib@gmail.com>
*
* @link https://github.com/mrjgreen/phroute
*/
class PhrouteWrapper
{
Expand Down
Loading

0 comments on commit 11f464b

Please sign in to comment.