mirror of
https://github.com/torrentpier/torrentpier
synced 2025-08-22 22:33:55 -07:00
Fixed a getting value from config through method toArray
This commit is contained in:
parent
1316bed86a
commit
dff1484214
1 changed files with 20 additions and 0 deletions
|
@ -69,4 +69,24 @@ class Config extends ZendConfig
|
||||||
|
|
||||||
return $value;
|
return $value;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @inheritdoc
|
||||||
|
*/
|
||||||
|
public function toArray()
|
||||||
|
{
|
||||||
|
$array = [];
|
||||||
|
$data = $this->data;
|
||||||
|
|
||||||
|
/** @var self $value */
|
||||||
|
foreach ($data as $key => $value) {
|
||||||
|
if ($value instanceof self) {
|
||||||
|
$array[$key] = $value->toArray();
|
||||||
|
} else {
|
||||||
|
$array[$key] = $this->prepareValue($value);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return $array;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue