/** * Removes the given box. * * @param Zend_Media_Iso14496_Box $box The box to remove * @throws Zend_Media_Iso14496_Exception if called on a non-container box */ public final function removeBox($box) { if (!$this->isContainer()) { require_once 'Zend/Media/Iso14496/Exception.php'; throw new Zend_Media_Iso14496_Exception('Box not a container'); } if ($this->hasBox($box->getType())) { foreach ($this->_boxes[$box->getType()] as $key => $value) { if ($box === $value) { unset($this->_boxes[$box->getType()][$key]); } } } }