summaryrefslogtreecommitdiff
path: root/src/Environment.php
diff options
context:
space:
mode:
authorAndres Rey <[email protected]>2016-10-21 19:04:29 +0100
committerAndres Rey <[email protected]>2016-10-21 19:04:29 +0100
commitfe73c4d7cf71023c4cc5654afb0aea47b179c084 (patch)
tree8f03b7f12986b6330f15ce8b0d88ba94cc23440f /src/Environment.php
parent8a36452b399a1b7df321a5bb2f1b7aa76cc2f129 (diff)
Added configuration class
Diffstat (limited to 'src/Environment.php')
-rw-r--r--src/Environment.php36
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;
+ }
+}