diff --git a/src/Zend/Exception.php b/src/Zend/Exception.php new file mode 100644 index 0000000..a439b5f --- /dev/null +++ b/src/Zend/Exception.php @@ -0,0 +1,96 @@ +_previous = $previous; + } else { + parent::__construct($msg, (int) $code, $previous); + } + } + + /** + * Overloading + * + * For PHP < 5.3.0, provides access to the getPrevious() method. + * + * @param string $method + * @param array $args + * @return mixed + */ + public function __call($method, array $args) + { + if ('getprevious' == strtolower($method)) { + return $this->_getPrevious(); + } + return null; + } + + /** + * String representation of the exception + * + * @return string + */ + public function __toString() + { + if (version_compare(PHP_VERSION, '5.3.0', '<')) { + if (null !== ($e = $this->getPrevious())) { + return $e->__toString() + . "\n\nNext " + . parent::__toString(); + } + } + return parent::__toString(); + } + + /** + * Returns previous Exception + * + * @return Exception|null + */ + protected function _getPrevious() + { + return $this->_previous; + } +} diff --git a/src/Zend/Media/Iso14496/Box/Tfra.php b/src/Zend/Media/Iso14496/Box/Tfra.php index 4e291fa..1532600 100644 --- a/src/Zend/Media/Iso14496/Box/Tfra.php +++ b/src/Zend/Media/Iso14496/Box/Tfra.php @@ -37,7 +37,7 @@ require_once 'Zend/Media/Iso14496/FullBox.php'; /**#@-*/ /** - * The Track Fragment Random Access Box provides entries that contains the location and the presentation time of + * The Track Fragment Random Access Box provides entries that contains the location and the presentation time of * the random accessible sample. It indicates that the sample in the entry can be random accessed. Note that not every * random accessible sample in the track needs to be listed in the table. * @@ -288,6 +288,10 @@ final class Zend_Media_Iso14496_Box_Tfra extends Zend_Media_Iso14496_FullBox } } + /** + * Returns the length sizes based on maximum numbers for each type of integer. + * @return integer Returns the length sizes based on maximum numbers for each type of integer. + */ private function _getLengthSizes() { $maxTrafNum = $maxTrunNum = $maxSampleNum = 0; @@ -309,6 +313,12 @@ final class Zend_Media_Iso14496_Box_Tfra extends Zend_Media_Iso14496_FullBox ); } + /** + * Returns the length size based on the given integer. + * + * @param integer $integer The integer to determine the length size from. + * @return Returns the length size of the given integer. + */ private function _getLengthSizeFromInteger($integer) { if ($integer <= 0xff) {