Returns the containers as array with the container name as key.

@return array The array with the containers
964449
public function getContainersAsArray()
    {

        // initialize the array for the containers
        $containers = array();

        // iterate over all found containers and assemble the array
        /** @var \AppserverIo\Psr\ApplicationServer\Configuration\ContainerConfigurationInterface $container */
        foreach ($this->getContainers() as $container) {
            $containers[$container->getName()] = $container;
        }

        // return the array with the containers
        return $containers;
    }
574694
public function toArray($keys=array()) {
        $vars = get_object_vars($this);

        $results = array();
        if (count($keys) == 0) {
            foreach($vars as $name=>$value) {
                if (is_string($value) || is_numeric($value) || is_bool($value)) {
                    $results[$name] = $value;
                }
            }

            return $results;
        }

        foreach($keys as $key) {
            if (!isset($vars[$key])) continue;
            $results[$key] = $vars[$key];
        }
        return $results;
    }
968250
public function toArray()
	{
		$output = array();

		foreach ($this->items as $key => $value) {
			array_push($output, $value->toArray(true));
		}

		return array(
			$this->getEntityName() => array(
					$this->getSingularEntityName() => $output
				),
		);
	}
429014
public function asContainArray()
    {
        $associations = [];
        foreach ($this->_associations as $assoc) {
            $associations += $assoc->asContainArray();
        }
        $config = $this->_config;
        if ($this->_forMatching !== null) {
            $config = ['matching' => $this->_forMatching] + $config;
        }

        return [
            $this->_name => [
                'associations' => $associations,
                'config' => $config
            ]
        ];
    }
13145
public function toArray()
    {
        $ret = [ ];
        foreach ($this as $key => $value) {
            $ret[ $key ] = $value;
        }
        return $ret;
    }
1278315
public function toArray()
    {
        $ary = [];

        foreach ($this as $key => $value) {
            $ary[$key] = $value;
        }

        return $ary;
    }
480846
public function toArray()
    {
        $methods = array();
        foreach ($this->getMethods() as $key => $method) {
            $methods[$key] = $method->toArray();
        }
        return $methods;
    }
205629
public function getFullDataSet () : array
    {
        if ($this->isUsingHandler()) :
            $this->regularize();
            $this->clearCache();

            return $this->_Cache = $this->_DataHandler->selectRangeEntitys(0,$this->_maxKey + 1);
        else :
            return $this->_Container;
        endif;
    }
759466
public function toArray()
	{
		$response = array();

		foreach ($this->items as $key => $item)
		{
			$response[] = $item->toArray();
		}

		return $response;
	}
1022683
public function toArray()
    {
        $arr = array
        (
            'container'         => $this->container,
            'format'            => $this->getDefaultFormat(),
            'types'             => $this->getTypes(),
            'notifications'     => $this->notifications->toArray()
        );

        return $arr;
    }
1336289
public function toArray() : array
    {
        $output = [];
        foreach ($this->data as $key => $val) {
            $output[$key] = $val instanceof ArraySerializable ? $val->toArray() : $val;
        }
        return $output;
    }
78253
public function toArray(): array
    {
        if ( ! count($this->attributes)) {
            return [];
        }

        // make this work recursively
        $array = [];

        foreach ($this->attributes as $key => $attribute) {

            if ($attribute instanceof Arrayable) {

                $attribute = $attribute->toArray();

            } elseif (is_array($attribute)) {

                $attribute = $this->recursiveToArray($attribute);
            }

            $array[$key] = $attribute;
        }

        return $array;
    }
90863
public function toArray()
    {
        return array(
            "resourceId" => $this->resourceId,
            "operation" => $this->operation,
            "specTypes" => $this->specTypes,
            "storeName" => $this->storeName,
            "podName" => $this->podName
        );
    }
1265363
public function toArray(): array
    {
        return array_map(function ($value) {
            if (method_exists($value, 'toArray')) {
                return $value->toArray();
            }

            return $value;
        }, $this->items);
    }
835687
public function toArray() {
        $result = iterator_to_array($this);
        foreach($result as $key => &$value) {
            if($value instanceof ArrayObject) {
                $value = $value->toArray();
            }
        }

        return $result;
    }
498585
public function toArray()
    {
        $result = [
            'browser'   => $this->browser->toArray(),
            'engine'    => $this->engine->toArray(),
            'os'        => $this->os->toArray(),
            'device'    => $this->device->toArray()
        ];

        if (empty($result['browser'])) {
            unset($result['browser']);
        }

        if (empty($result['engine'])) {
            unset($result['engine']);
        }

        if (empty($result['os'])) {
            unset($result['os']);
        }

        if (empty($result['device'])) {
            unset($result['device']);
        }

        if ($this->camouflage) {
            $result['camouflage'] = true;
        }

        return $result;
    }
125320
public function toArray(): array
    {
        $result = [];
        foreach (static::getInstanceProperties() as $key) {
            $result[$key] = $this->$key;
        }

        return $result;
    }