PluginProbe
Fluent Booking – The Ultimate Appointments Scheduling, Events Booking, Events Calendar Solution / 1.5.21
Fluent Booking – The Ultimate Appointments Scheduling, Events Booking, Events Calendar Solution v1.5.21
2.4.0 2.3.0 2.2.5 2.2.0 2.1.2 2.1.1 trunk 1.10.0 1.10.01 1.10.02 1.5.0 1.5.01 1.5.02 1.5.1 1.5.10 1.5.20 1.5.21 1.5.22 1.5.23 1.5.24 1.5.25 1.6.0 1.7.0 1.7.1 1.7.2 All 33 releases
fluent-booking / vendor / wpfluent / framework / src / WPFluent / Foundation / Config.php

Config.php in Fluent Booking – The Ultimate Appointments Scheduling, Events Booking, Events Calendar Solution 1.5.21, at vendor/wpfluent/framework/src/WPFluent/Foundation/Config.php

54 lines 990 B
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 namespace FluentBooking\Framework\Foundation;
4
5 use FluentBooking\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