Converts the current data table to an array

@return array
@throws Exception
428691
public function originalRender()
    {
        Piwik::checkObjectTypeIs($this->table, array('Simple', 'DataTable'));

        if ($this->table instanceof Simple) {
            $array = $this->renderSimpleTable($this->table);
        } elseif ($this->table instanceof DataTable) {
            $array = $this->renderTable($this->table);
        }

        if ($this->serialize) {
            $array = serialize($array);
        }
        return $array;
    }
1150989
public function getResultsAsArray()
    {
        $new = array();
        foreach ((array) $this->results as $result) {
            if ($result instanceof Object)
                $new[] = $result->toArray();
            else if (is_array($result))
                return $this->results;
            else
                throw new Exception('Cannot convert to array: '.ClassUtils::getQualifiedType($result));
        }
        return $new;
    }
759148
public function toArray()
    {
        if (\is_array($this->data)) {
            return $this->data;
        }

        if ($this->data instanceof \ArrayIterator) {
            return iterator_to_array($this->data, false);
        }

        if ($this->data instanceof \IteratorAggregate) {
            return iterator_to_array($this->data->getIterator(), false);
        }

        throw new ArrayConversionException('Cannot convert data to array');
    }
1340824
public function toArray()
    {
        return [
            'field' => $this->getRawProperty('field'),
            'from-field' => $this->getRawProperty('fromField'),
            'to-field' => $this->getRawProperty('toField'),
            'is-deleted' => $this->isDeleted,
            'is-added' => $this->isAdded,
        ];
    }
13145
public function toArray()
    {
        $ret = [ ];
        foreach ($this as $key => $value) {
            $ret[ $key ] = $value;
        }
        return $ret;
    }
255257
public function toArray()
    {
        $arrayResult = array(
            'id' => $this->id,
            'string' => $this->sql,
            'command' => $this->getCommand(),
            'executed' => $this->executed,
            'isDDL' => $this->isDDL(),
            'isDML' => $this->isDML(),
            'isDCL' => $this->isDCL(),
            'isTCL' => $this->isTCL(),
            'isAnon' => $this->isAnon(),
            'isRead' => $this->isRead(),
            'isWrite' => $this->isWrite(),
            'result' => $this->result->toarray(),
        );

        return $arrayResult;
    }
563572
public function toArray()
    {
        $this->setHtmlAttribute('data-orderable', $this->isOrderable() ? 'true' : 'false');

        return [
            'attributes'  => $this->htmlAttributesToString(),
            'title'       => $this->getTitle(),
            'isOrderable' => $this->isOrderable(),
        ];
    }
785755
public function toArray()
    {
        $this->dataType('array');
        
        $this->execute();
        
        if ($this->def['savePath']) {
            return $this->save();
        } elseif ($this->def['verbose']) {
            return $this->getVerboseResponse();
        }
        
        return $this->getError() ? : json_decode($this->responseText, true);
    }
547310
public function toArray()
    {
        $fn = 'toArray' . ucfirst($this->presentation);
        if (!method_exists($this, $fn)) {
            throw new \Exception('There is no method ' . $fn . '.');
        }
        return $this->$fn();
    }
997872
public function toArray()
    {
        $result = array();
        foreach ($this as $key => $row) {
            $result[$key] = $row->toArray();
        }
        return $result;
    }
220038
public function toArray()
    {
        $data = parent::toArray();

        foreach(array_keys($data) as $key)
        {
            if (substr($key, 0, 1) === '_') {
                unset($data[$key]);
            }
        }

        return $data;
    }
1114422
public function toArray(): array
    {
        $data = ReflectionUtil::objToSnakeArray($this, static::blacklist());
        foreach ($this->renamed as $name => $newName) {
            if (!array_key_exists($name, $data)) {
                continue;
            }
            $data[$newName] = $data[$name];
            unset($data[$name]);
        }

        return $data;
    }
1336289
public function toArray() : array
    {
        $output = [];
        foreach ($this->data as $key => $val) {
            $output[$key] = $val instanceof ArraySerializable ? $val->toArray() : $val;
        }
        return $output;
    }
644757
public function toArray()
    {
        $return = array();
        foreach ($this->myData as $key => $value) {
            $return[$key] = ($value instanceof CanConvertToArray) ? $value->toArray() : $value;
        }

        return $return;
    }
389779
public function toArray() {
        $data = array_map(function ($value) {
            if ($value instanceof ArrayAble) {
                return $value->toArray();
            }
            return $value;
        }, $this->getPage());
        return [
            'paging' => [
                'limit' => $this->getPageSize(),
                'offset' => $this->getIndex(),
                'total' => $this->getTotal(),
                'more' => $this->hasMore()
            ],
            'data' => $data
        ];
    }
883340
public function toArray()
    {
        $arrayResult = array(
            'affected' => $this->getAffected(),
            'insertId' => $this->getInsertId(),
            'startRow' => $this->getStartRow(),
            'totalRows' => $this->getTotalRows(),
            'totalShows' => $this->getTotalShows(),
            'start' => $this->getStart(),
            'end' => $this->getEnd(),
            'seconds' => $this->getSeconds(),
            'types' => $this->getTypes(),
            'columns' => $this->getColumns(),
            'data' => array(),
        );

        if ($this->dataType instanceof DataInterface) {
            for ($i = 0; $i < $this->length(); ++$i) {
                if ($this->hasIndex($i)) {
                    $arrayResult['data'][] = $this->getIndex($i)->toArray();
                }
            }
        } else {
            $arrayResult['data'] = $this->getArrayCopy();
        }

        return $arrayResult;
    }
930840
public function toArray(): array
    {
        $resources = [];

        foreach ($this->getResources() as $resource)
        {
            $resources[] = $resource->toArray();
        }

        $data = parent::toArray();

        $data['data'] = $resources;

        return $data;
    }