PluginProbe
FluentCommunity – Ultra-Fast High-Performance Social Network, Community, LMS & Online Courses / 1.0.92
FluentCommunity – Ultra-Fast High-Performance Social Network, Community, LMS & Online Courses v1.0.92
2.11.0 2.10.0 2.10.01 2.9.1 2.9.0 2.8.1 2.8.0 2.7.7 2.7.5 2.7.0 2.6.01 2.6.0 2.5.0 2.4.01 trunk 1.0.90 1.0.91 1.0.92 1.0.93 1.0.94 1.0.95 1.0.96 1.0.97 1.0.98 1.0.99 All 78 releases
fluent-community / vendor / wpfluent / framework / src / WPFluent / Foundation / Config.php

Config.php in FluentCommunity – Ultra-Fast High-Performance Social Network, Community, LMS & Online Courses 1.0.92, at vendor/wpfluent/framework/src/WPFluent/Foundation/Config.php

54 lines 994 B
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 namespace FluentCommunity\Framework\Foundation;
4
5 use FluentCommunity\Framework\Support\Arr;
6
7 class Config
8 {
9 /**
10 * The config data
11 * @var array
12 */
13 protected $data = [];
14
15 /**
16 * Construct the Config instance
17 * @param null
18 */
19 public function __construct($data)
20 {
21 $this->data = $data;
22 }
23
24 /**
25 * Retrieve all config data
26 * @return array
27 */
28 public function all()
29 {
30 return $this->get();
31 }
32
33 /**
34 * Retrieve specific item from config array
35 * @param string $key
36 * @param string $default
37 * @return mixed
38 */
39 public function get($key = null, $default = null)
40 {
41 return $key ? Arr::get($this->data, $key, $default) : $this->data;
42 }
43
44 /**
45 * Set an item into the config array on the fly.
46 * @param string $key
47 * @param mkixed $value
48 */
49 public function set($key, $value)
50 {
51 Arr::set($this->data, $key, $value);
52 }
53 }
54