public function getContents()
    {
        if (empty($this->contents)) {
            return [];
        }
        $result = [];
        $last = 0;
        foreach ($this->indexes as $index) {
            if (isset($this->contents[$index])) {
                $result[] = $this->contents[$index];
                $last = $index;
            } else {
                $result[] = null;
            }
        }
        return array_slice($result, 0, $last + 1);
    }