public function getLength() { $total = 0; foreach ($this->elements as $val) { $total += $val->getByteLength(); } return $total; }