Skip to content

Commit ad459e6

Browse files
committed
Improve various parts of documentation
1 parent 8b650b7 commit ad459e6

File tree

10 files changed

+37
-13
lines changed

10 files changed

+37
-13
lines changed

DependencyInjection/Compiler/MetadataResourceResolverPass.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
/**
1818
* Scans the services tree for resource loaders and adds them to the resource resolver.
1919
*
20-
* @author Tim Goudriaan <tim@codedmonkey.com>
20+
* @author Tim Goudriaan <tim@harmony-project.io>
2121
*/
2222
class MetadataResourceResolverPass implements CompilerPassInterface
2323
{

DependencyInjection/Configuration.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
/**
1818
* This class validates and merges configuration for the bundle.
1919
*
20-
* @author Tim Goudriaan <tim@codedmonkey.com>
20+
* @author Tim Goudriaan <tim@harmony-project.io>
2121
*/
2222
class Configuration implements ConfigurationInterface
2323
{

DependencyInjection/HarmonyModularExtension.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
/**
1919
* Loads and manages the bundle configuration.
2020
*
21-
* @author Tim Goudriaan <tim@codedmonkey.com>
21+
* @author Tim Goudriaan <tim@harmony-project.io>
2222
*/
2323
class HarmonyModularExtension extends Extension
2424
{
@@ -29,7 +29,7 @@ public function load(array $configs, ContainerBuilder $container)
2929
{
3030
$config = $this->processConfiguration(new Configuration(), $configs);
3131

32-
// disable the bundle if no module class is specified
32+
// Disable the bundle if no module class is specified
3333
if (!$config['module_class']) {
3434
return;
3535
}
@@ -83,6 +83,7 @@ private function setupRoutePrefix(array $config, ContainerBuilder $container)
8383
private function setupServices(array $config, ContainerBuilder $container)
8484
{
8585
// Define a different default module manager when using the default StaticModule class
86+
// If you choose to extend the StaticModule class, make sure to change this manually
8687
$static = 'Harmony\Component\ModularRouting\Model\StaticModule' == $config['module_class'];
8788
$defaultManagerService = !$static ? 'harmony_modular.module_manager.doctrine' : 'harmony_modular.module_manager.static';
8889

Doctrine/ModularSubscriber.php

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
/**
1818
* Handle events regarding modular entities.
1919
*
20-
* @author Tim Goudriaan <tim@codedmonkey.com>
20+
* @author Tim Goudriaan <tim@harmony-project.io>
2121
*/
2222
class ModularSubscriber extends BaseSubscriber implements EventSubscriber
2323
{
@@ -35,7 +35,10 @@ public function __construct(ContainerInterface $container, $moduleClass)
3535
$this->container = $container;
3636
$this->moduleClass = $moduleClass;
3737
}
38-
38+
39+
/**
40+
* {@inheritdoc}
41+
*/
3942
public function getModuleManager()
4043
{
4144
return $this->container->get('harmony_modular.module_manager');

EventListener/RoutingSubscriber.php

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
/**
1111
* Handle events regarding routing.
1212
*
13-
* @author Tim Goudriaan <tim@codedmonkey.com>
13+
* @author Tim Goudriaan <tim@harmony-project.io>
1414
*/
1515
class RoutingSubscriber extends BaseSubscriber implements EventSubscriberInterface
1616
{
@@ -27,11 +27,17 @@ public function __construct(ContainerInterface $container)
2727
$this->container = $container;
2828
}
2929

30+
/**
31+
* {@inheritdoc}
32+
*/
3033
public function getModuleManager()
3134
{
3235
return $this->container->get('harmony_modular.module_manager');
3336
}
3437

38+
/**
39+
* {@inheritdoc}
40+
*/
3541
public function getModularRouter()
3642
{
3743
return $this->container->get('harmony_modular.router');

HarmonyModularBundle.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
use Symfony\Component\HttpKernel\Bundle\Bundle;
1616

1717
/**
18-
* @author Tim Goudriaan <tim@codedmonkey.com>
18+
* @author Tim Goudriaan <tim@harmony-project.io>
1919
*/
2020
class HarmonyModularBundle extends Bundle
2121
{

Request/ModularParamConverter.php

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
namespace Harmony\Bundle\ModularBundle\Request;
1212

1313
use Doctrine\Common\Persistence\ManagerRegistry;
14+
use Doctrine\Common\Persistence\ObjectManager;
1415
use Doctrine\ORM\NoResultException;
1516
use Harmony\Component\ModularRouting\Manager\ModuleManagerInterface;
1617
use Harmony\Component\ModularRouting\Model\ModularRepositoryInterface;
@@ -20,9 +21,9 @@
2021
use Symfony\Component\HttpFoundation\Request;
2122

2223
/**
23-
* Match the any modular (entity) argument of the controller
24+
* Match any modular (entity) argument of the controller.
2425
*
25-
* @author Tim Goudriaan <tim@codedmonkey.com>
26+
* @author Tim Goudriaan <tim@harmony-project.io>
2627
*/
2728
class ModularParamConverter extends DoctrineParamConverter implements ParamConverterInterface
2829
{
@@ -31,6 +32,10 @@ class ModularParamConverter extends DoctrineParamConverter implements ParamConve
3132
*/
3233
protected $manager;
3334

35+
/**
36+
* @param ManagerRegistry|null $registry
37+
* @param ModuleManagerInterface $manager
38+
*/
3439
public function __construct(ManagerRegistry $registry = null, ModuleManagerInterface $manager)
3540
{
3641
$this->manager = $manager;
@@ -126,6 +131,12 @@ public function supports(ParamConverterConfiguration $configuration)
126131
return $metadata->hasAssociation('module');
127132
}
128133

134+
/**
135+
* @param string|null $name
136+
* @param string $class
137+
*
138+
* @return ObjectManager|null
139+
*/
129140
private function getManager($name, $class)
130141
{
131142
if (null === $name) {

Request/ModuleParamConverter.php

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,9 @@
1717
use Symfony\Component\Routing\Exception\ResourceNotFoundException;
1818

1919
/**
20-
* Match the module argument of the controller
20+
* Match the module argument of the controller.
2121
*
22-
* @author Tim Goudriaan <tim@codedmonkey.com>
22+
* @author Tim Goudriaan <tim@harmony-project.io>
2323
*/
2424
class ModuleParamConverter implements ParamConverterInterface
2525
{
@@ -28,6 +28,9 @@ class ModuleParamConverter implements ParamConverterInterface
2828
*/
2929
protected $manager;
3030

31+
/**
32+
* @param ModuleManagerInterface $manager
33+
*/
3134
public function __construct(ModuleManagerInterface $manager)
3235
{
3336
$this->manager = $manager;

LICENSE renamed to license

File renamed without changes.

README.md renamed to readme.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
ModularBundle
22
=============
33

4-
The ModularBundle provides an integrated implementation of the Harmony Modular Routing component for the Symfony framework. This bundle relies on the Symfony CMF RoutingBundle to create a chain of routers to avoid replacing the default Router.
4+
ModularBundle provides an integrated implementation of the Harmony ModularRouting component for the Symfony framework. This bundle relies on Symfony CMF RoutingBundle to create a chain of routers to avoid replacing the default Router.
55

66
Installation
77
------------

0 commit comments

Comments
 (0)