diff --git a/composer.json b/composer.json index 07a7afa..d621132 100644 --- a/composer.json +++ b/composer.json @@ -47,7 +47,8 @@ "php": ">=5.5", "yiisoft/yii2": "~2.0.0", "yiisoft/yii2-authclient": "^2.1.0", - "yiisoft/yii2-bootstrap": "^2.0.0" + "yiisoft/yii2-bootstrap": "^2.0.0", + "yiisoft/yii2-swiftmailer": "^2.0.0" }, "require-dev": { "squizlabs/php_codesniffer": "^2.7", diff --git a/lib/User/Bootstrap.php b/lib/User/Bootstrap.php index 7b0d871..27c5509 100644 --- a/lib/User/Bootstrap.php +++ b/lib/User/Bootstrap.php @@ -25,6 +25,10 @@ use yii\console\Application as ConsoleApplication; use yii\i18n\PhpMessageSource; use yii\web\Application as WebApplication; +/** + * Bootstrap class of the yii2-usuario extension. Configures container services, initializes translations, + * builds class map, and does the other setup actions participating in the application bootstrap process. + */ class Bootstrap implements BootstrapInterface { /** @@ -317,7 +321,7 @@ class Bootstrap implements BootstrapInterface $mapping = array_merge($defaults, $userClassMap); foreach ($mapping as $name => $definition) { - $map[$this->getRoute($routes, $name)."\\$name"] = $definition; + $map[$this->getRoute($routes, $name) . "\\$name"] = $definition; } return $map; diff --git a/lib/User/Module.php b/lib/User/Module.php index e799753..0c6eecc 100644 --- a/lib/User/Module.php +++ b/lib/User/Module.php @@ -12,8 +12,12 @@ namespace Da\User; use Da\User\Contracts\MailChangeStrategyInterface; +use Da\User\Service\MailService; use yii\base\Module as BaseModule; +/** + * This is the main module class of the yii2-usuario extension. + */ class Module extends BaseModule { /** @@ -41,7 +45,7 @@ class Module extends BaseModule */ public $allowPasswordRecovery = true; /** - * @var bool Whether user can remove his account + * @var bool whether user can remove his account */ public $allowAccountDelete = false; /** @@ -87,6 +91,7 @@ class Module extends BaseModule public $blowfishCost = 10; /** * @var array the class map. How the container should load specific classes + * @see Bootstrap::buildClassMap() for more details */ public $classMap = []; @@ -103,5 +108,8 @@ class Module extends BaseModule 'settings/' => 'settings/', ]; + /** + * @var string + */ public $viewPath = '@Da/User/resources/views'; }