Skip to content
This repository was archived by the owner on May 23, 2023. It is now read-only.

Commit 453680e

Browse files
Added arg to Environment::get()
You can now specify a property to return in the get method
1 parent 14c10aa commit 453680e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/Environment.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,8 +60,8 @@ public function __set($name, $value) {
6060
/**
6161
* @return self
6262
*/
63-
public static function get(): self
63+
public static function get(string $property = ""): mixed
6464
{
65-
return self::$instance;
65+
return (empty($property)) ? self::$instance : self::$instance->$property;
6666
}
6767
}

0 commit comments

Comments
 (0)