service/components/contents/HttpContentStream.php
/**
     * Processes params passed to stream
     *
     * @return void
     */
Processes params passed to stream
@return void
Processes params passed to stream @return void
public function processParams()
    {
        if ($this->getParameter('rangeStart') !== null && $this->getParameter('rangeEnd') !== null) {
            $rangeStart = (int)$this->getParameter('rangeStart');
            $rangeEnd = (int)$this->getParameter('rangeEnd');
            if ($rangeEnd < $rangeStart) {
                throw new Exception('Invalid range.');
            }
            $context = $this->getContext();
            $context->addOption('http', 'header', 'Range: bytes='.$this->getParameter('rangeStart').'-'.$this->getParameter('rangeEnd'));
        }
    }
public function processParams ( ) { if ( $ this -> getParameter ( 'rangeStart' ) !== null && $ this -> getParameter ( 'rangeEnd' ) !== null ) { $ rangeStart = ( int ) $ this -> getParameter ( 'rangeStart' ) ; $ rangeEnd = ( int ) $ this -> getParameter ( 'rangeEnd' ) ; if ( $ rangeEnd < $ rangeStart ) { throw new Exception ( 'Invalid range.' ) ; } $ context = $ this -> getContext ( ) ; $ context -> addOption ( 'http' , 'header' , 'Range: bytes=' . $ this -> getParameter ( 'rangeStart' ) . '-' . $ this -> getParameter ( 'rangeEnd' ) ) ; } }
Processes params passed to stream
 @return void
Processes params passed to stream @return void