You are here

private function Base::toArray in DRD Agent 8.3

Same name and namespace in other branches
  1. 4.0.x 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()
Base::run in src/Agent/Action/Base.php
Main callback to execute an action.

File

src/Agent/Action/Base.php, line 157

Class

Base
Base class for Remote DRD Action Code.

Namespace

Drupal\drd_agent\Agent\Action

Code

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;
}