Return an array containing the elements in each()

@return array
551113
public function toArrayValues()
    {
        $result = [];
        foreach ($this->each() as $v) {
            $this->_toArrayValues($result, $v);
        }
        return $result;
    }
1209621
public function toArray()
    {
        $result = [];
        foreach ($this->results as $r) {
            $result[] = $r->toArray();
        }
        return $result;
    }
235370
public function toArray() {
		$values = [];
		foreach($this->values as $id => $value) {
			$values[$id] = $value->getRawValue();
		}
		return $values;
	}
822576
public function toArray()
    {
        return array(
            'id' => $this->id,
            'section' => $this->section,
            'title' => $this->title,
            'description' => $this->description,
            'position' => $this->position
        );
    }
59962
public function toArray()
    {
        $a = array();
        foreach ($this->value as $key => $value) {
            $a[$key] = $value->toArray();
        }
        return $a;
    }
187219
public function toArray()
    {
        $data = [];

        foreach ($this->keys() as $key) {
            $data[$key] = $this->offsetGet($key);
        }

        return $data;
    }
807417
public function toArray() {
        $arr = array();
        foreach ($this->cells as $key => $cell) {
            $arr[] = $cell->toArray();
        }
        return $arr;
    }
989254
public function toArray()
	{
		$result = array( 'localname' => $this->localName );
		if ( isset( $this->prefix ) ) array( 'prefix' => $this->prefix );
		if ( isset( $this->namespaceURI ) ) array( 'namespace' => $this->namespaceURI );
		return $result;
	}
1056279
public function toArray()
    {

        $attributes = [];

        foreach ($this->attributes as $name => $value) {
            $attributes[$name] = $this->getOriginalAttribute($name);
        }

        foreach ($this->appends as $name) {
            $attributes[$name] = $this->getAppendsAttribute($name);
        }

        return $attributes;
    }
316560
public function toArray()
    {
        $arr = array();
        foreach ($this as $key => $value) {
            $method = 'get' . $key;
            if (method_exists($this, $method)) {
                $arr[$key] = $this->$method();
            }
        }

        return $arr;
    }
630074
public function toArray(): array 
    {

        $to_array = function (EncapsulatedEdge $encapsulated): array {
            return $encapsulated->toArray();
        };

        $array = [];

        $array["to"] = [];
        foreach($this->to as $to => $encapsulated) {
            $array["to"][$to] = array_map($to_array, $encapsulated);
        }

        $array["from"] = [];
        foreach($this->from as $from => $encapsulated) {
            $array["from"][$from] = array_map($to_array, $encapsulated);
        }

        $array["in"] = array_map($to_array, $this->in);
        $array["out"] = array_map($to_array, $this->out);

        return $array;
    }
695109
public function toArray()
    {
        return [
            'name'        => $this->name,
            'title'       => $this->title,
            'url'         => $this->url,
            'icon'        => $this->icon,
            'active'      => $this->isActive(),
            'children'    => $this->children->toArray(),
            'roles'       => $this->roles,
            'permissions' => $this->permissions,
        ];
    }
1300293
public function toArray()
    {
        $response = $this->simpleXmlObject();
        
        // Converting the SimpleXMLElement Object to array()
        $response = json_encode($response);
        
        return (json_decode($response, true));
    }
640600
public function toArray()
    {
        return array(
            'scheme' => $this->scheme->get(),
            'user' => $this->user->get(),
            'pass' => $this->pass->get(),
            'host' => $this->host->get(),
            'port' => $this->port->get(),
            'path' => $this->path->get(),
            'query' => $this->query->get(),
            'fragment' => $this->fragment->get(),
        );
    }
1287672
function ToArray()
    {
        $result = array();
        $item = $this->TopMost();
        while ($item)
        {
            $result[] = $item;
            $item = $this->NextOf($item);
        }
        return $result;
    }
856004
public function toArray()
	{
		$result = [];
		
		foreach (get_class_methods($this) as $method)
		{
			if (stripos($method, 'get') === 0)
			{
				$result[strtolower(substr($method, 3))] = $this->{$method}();
			}
		}
		
		return $result;
	}
1277647
public function toArray()
    {
        
        $result = $this->array;
        
        foreach ($result as $key => $val) {
            
            /**
             * @var self $val
             */
            if (is_a($val, self::class)) {
                $result[$key] = $val->toArray();
            } else {
                $result[$key] = $val;
            }
        }
        
        return $result;
    }