/** * Retrieves length * Defaults to file size if needed * @return integer */ public function getLength() { $length = parent::getLength(); if ($length < 1) { $length = $this->getFile()->getSize(); } return $length; }