private function Base::toArray in DRD Agent 4.0.x
Same name and namespace in other branches
- 8.3 src/Agent/Action/Base.php \Drupal\drd_agent\Agent\Action\Base::toArray()
Recursivly convert request arguments to an array.
Parameters
mixed $items: Arguments to convert.
Return value
mixed Array of all the given arguments.
1 call to Base::toArray()
File
- src/
Agent/ Action/ Base.php, line 157
Class
- Base
- Base class for Remote DRD Action Code.
Namespace
Drupal\drd_agent\Agent\ActionCode
private function toArray($items) {
foreach ($items as $key => $item) {
if (is_object($item)) {
$items[$key] = $this
->toArray((array) $item);
}
elseif (is_array($item)) {
$items[$key] = $this
->toArray($item);
}
}
return $items;
}