Beispiel #1
0
 /**
  * Adds a new box into the current box and returns it.
  *
  * @param Zend_Media_Iso14496_Box $box The box to add
  * @return Zend_Media_Iso14496_Box
  * @throws Zend_Media_Iso14496_Exception if called on a non-container box
  */
 public final function addBox(&$box)
 {
     if (!$this->isContainer()) {
         require_once 'Zend/Media/Iso14496/Exception.php';
         throw new Zend_Media_Iso14496_Exception('Box not a container');
     }
     $box->setParent($this);
     $box->setOptions($this->_options);
     if (!$this->hasBox($box->getType())) {
         $this->_boxes[$box->getType()] = array();
     }
     return $this->_boxes[$box->getType()][] = $box;
 }