| @@ -1,5 +1,18 @@ | ||
| 1 | 1 | <?php |
| 2 | +/** | |
| 3 | + * Config.php | |
| 4 | + * | |
| 5 | + * The ConfigFactory class file. | |
| 6 | + * | |
| 7 | + * PHP versions 5 | |
| 8 | + * | |
| 9 | + * @author Alexander Schneider <alexanderschneider85@gmail.com> | |
| 10 | + * @copyright 2008-2017 Alexander Schneider | |
| 11 | + * @license http://www.gnu.org/licenses/gpl-2.0.html GNU General Public License, version 2 | |
| 12 | + * @version SVN: $id$ | |
| 13 | + * @link http://wordpress.org/extend/plugins/user-access-manager/ | |
| 14 | + */ | |
| 2 | 15 | |
| 3 | 16 | declare(strict_types=1); |
| 4 | 17 | |
| 5 | 18 | namespace UserAccessManager\Config; |
| @@ -5,15 +18,31 @@ | ||
| 5 | 18 | namespace UserAccessManager\Config; |
| 6 | 19 | |
| 7 | 20 | use UserAccessManager\Wrapper\Wordpress; |
| 8 | 21 | |
| 22 | +/** | |
| 23 | + * Class ConfigFactory | |
| 24 | + * | |
| 25 | + * @package UserAccessManager\Config | |
| 26 | + */ | |
| 9 | 27 | class ConfigFactory |
| 10 | 28 | { |
| 11 | - public function __construct( | |
| 12 | - private Wordpress $wordpress | |
| 13 | - ) { | |
| 29 | + private $wordpress; | |
| 30 | + | |
| 31 | + /** | |
| 32 | + * ConfigFactory constructor. | |
| 33 | + * @param Wordpress $wordpress | |
| 34 | + */ | |
| 35 | + public function __construct(Wordpress $wordpress) | |
| 36 | + { | |
| 37 | + $this->wordpress = $wordpress; | |
| 14 | 38 | } |
| 15 | 39 | |
| 40 | + /** | |
| 41 | + * Returns a new configuration. | |
| 42 | + * @param string $key | |
| 43 | + * @return Config | |
| 44 | + */ | |
| 16 | 45 | public function createConfig(string $key): Config |
| 17 | 46 | { |
| 18 | 47 | return new Config($this->wordpress, $key); |
| 19 | 48 | } |