public function getSize() { $document = $this->getDocument(); if (isset($document['length'])) { return $document['length']; } return 0; }