diff options
author | Andres Rey <[email protected]> | 2016-10-21 19:04:29 +0100 |
---|---|---|
committer | Andres Rey <[email protected]> | 2016-10-21 19:04:29 +0100 |
commit | fe73c4d7cf71023c4cc5654afb0aea47b179c084 (patch) | |
tree | 8f03b7f12986b6330f15ce8b0d88ba94cc23440f /src/Environment.php | |
parent | 8a36452b399a1b7df321a5bb2f1b7aa76cc2f129 (diff) |
Added configuration class
Diffstat (limited to 'src/Environment.php')
-rw-r--r-- | src/Environment.php | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/src/Environment.php b/src/Environment.php new file mode 100644 index 0000000..9f3dc86 --- /dev/null +++ b/src/Environment.php @@ -0,0 +1,36 @@ +<?php + +namespace andreskrey\Readability; + +final class Environment +{ + /** + * @var Configuration + */ + protected $config; + + public function __construct(array $config = array()) + { + $this->config = new Configuration($config); + } + + /** + * @return Configuration + */ + public function getConfig() + { + return $this->config; + } + + /** + * @param array $config + * + * @return Environment + */ + public static function createDefaultEnvironment(array $config = array()) + { + $environment = new static($config); + + return $environment; + } +} |