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

Commit 056cf90

Browse files
committed
up
1 parent f6a60c4 commit 056cf90

File tree

1 file changed

+10
-5
lines changed

1 file changed

+10
-5
lines changed

src/traits/ConfigTrait.php

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -78,22 +78,27 @@ public function delValue($name)
7878

7979
/**
8080
* Method to get property Options
81-
* @return array
81+
* @param string|null $key
82+
* @return array
8283
*/
83-
public function getConfig()
84+
public function getConfig(string $key = null)
8485
{
86+
if ($key) {
87+
return $this->getValue($key);
88+
}
89+
8590
return $this->config;
8691
}
8792

8893
/**
8994
* Method to set property config
9095
* @param array $config
91-
* @param bool $deepMerge
96+
* @param bool $loopMerge
9297
* @return static Return self to support chaining.
9398
*/
94-
public function setConfig(array $config, $deepMerge = true)
99+
public function setConfig(array $config, $loopMerge = true)
95100
{
96-
$this->config = $deepMerge ? Arr::merge($this->config, $config) : $config;
101+
$this->config = $loopMerge ? Arr::merge($this->config, $config) : $config;
97102

98103
return $this;
99104
}

0 commit comments

Comments
 (0)