Skip to content

Commit 609960d

Browse files
committed
+ add minimal documentation
Signed-off-by: Christoph Potas <[email protected]>
1 parent d6cb6d6 commit 609960d

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

user_guide_src/source/general/configuration.rst

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,18 @@ create an instance of the class and all your settings are there for you.
1111
Accessing Config Files
1212
======================
1313

14-
You can access config files within your classes by creating a new instance. All of the properties
14+
You can access config files within your classes by creating a new instance or using the config function. All of the properties
1515
are public, so you access the settings like any other property::
1616

17+
// Creating new class by hand
1718
$config = new \Config\EmailConfig();
1819

20+
// Creating new class with config function
21+
$config = config( 'EmailConfig', false );
22+
23+
// Get shared instance with config function
24+
$config = config( 'EmailConfig' );
25+
1926
// Access settings as class properties
2027
$protocol = $config->protocol;
2128
$mailpath = $config->mailpath;

0 commit comments

Comments
 (0)