public function addRowsFromSerializedArray($serialized)
    {
        $rows = $this->unserializeRows($serialized);

        if (array_key_exists(self::ID_SUMMARY_ROW, $rows)) {
            if (is_array($rows[self::ID_SUMMARY_ROW])) {
                $this->summaryRow = new Row($rows[self::ID_SUMMARY_ROW]);
            } elseif (isset($rows[self::ID_SUMMARY_ROW]->c)) {
                $this->summaryRow = new Row($rows[self::ID_SUMMARY_ROW]->c); // Pre Piwik 2.13
            }
            unset($rows[self::ID_SUMMARY_ROW]);
        }

        foreach ($rows as $id => $row) {
            if (isset($row->c)) {
                $this->addRow(new Row($row->c)); // Pre Piwik 2.13
            } else {
                $this->addRow(new Row($row));
            }
        }
    }
public function addRowsFromSerializedArray($serialized)
    {
        $rows = $this->unserializeRows($serialized);

        if (array_key_exists(self::ID_SUMMARY_ROW, $rows)) {
            if (is_array($rows[self::ID_SUMMARY_ROW])) {
                $this->summaryRow = new Row($rows[self::ID_SUMMARY_ROW]);
            } elseif (isset($rows[self::ID_SUMMARY_ROW]->c)) {
                $this->summaryRow = new Row($rows[self::ID_SUMMARY_ROW]->c); // Pre Piwik 2.13
            }
            unset($rows[self::ID_SUMMARY_ROW]);
        }

        foreach ($rows as $id => $row) {
            if (isset($row->c)) {
                $this->addRow(new Row($row->c)); // Pre Piwik 2.13
            } else {
                $this->addRow(new Row($row));
            }
        }
    }
public function addRowsFromSerializedArray ( $ serialized ) { $ rows = $ this -> unserializeRows ( $ serialized ) ; if ( array_key_exists ( self :: ID_SUMMARY_ROW , $ rows ) ) { if ( is_array ( $ rows [ self :: ID_SUMMARY_ROW ] ) ) { $ this -> summaryRow = new Row ( $ rows [ self :: ID_SUMMARY_ROW ] ) ; } elseif ( isset ( $ rows [ self :: ID_SUMMARY_ROW ] -> c ) ) { $ this -> summaryRow = new Row ( $ rows [ self :: ID_SUMMARY_ROW ] -> c ) ; // Pre Piwik 2.13 } unset ( $ rows [ self :: ID_SUMMARY_ROW ] ) ; } foreach ( $ rows as $ id => $ row ) { if ( isset ( $ row -> c ) ) { $ this -> addRow ( new Row ( $ row -> c ) ) ; // Pre Piwik 2.13 } else { $ this -> addRow ( new Row ( $ row ) ) ; } } }
Adds a set of rows from a serialized DataTable string.

See {@link serialize()}.

_Note: This function will successfully load DataTables serialized by Piwik 1.X._

@param string $serialized A string with the format of a string in the array returned by
{@link serialize()}.
@throws Exception if `$serialized` is invalid.
Adds a set of rows from a serialized DataTable string .