lib/hz2600/Kazoo/Api/Entity/AbstractEntity.php
public function getRaw($stream = false)
    {
        $this->setTokenValue($this->getEntityIdName(), $this->getId());
        $uri = $this->getURI('/raw');
        $x   = $this->getSDK()->get($uri, array(), array('accept'=>'audio/*',
            'content_type'=>'audio/*', 'Range'=> 'bytes'));

        header('Content-Type: '.$x->getHeader('Content-Type')[0]);
        header('content-length: '.$x->getHeader('content-length')[0]);
        header('Accept-Ranges: '.$x->getHeader('Accept-Ranges')[0]);

        if (!$stream) {
            header('Content-Disposition: '.$x->getHeader('Content-Disposition')[0]);
        }
        echo $x->getBody();
    }
public function getRaw($stream = false)
    {
        $this->setTokenValue($this->getEntityIdName(), $this->getId());
        $uri = $this->getURI('/raw');
        $x   = $this->getSDK()->get($uri, array(), array('accept'=>'audio/*',
            'content_type'=>'audio/*', 'Range'=> 'bytes'));

        header('Content-Type: '.$x->getHeader('Content-Type')[0]);
        header('content-length: '.$x->getHeader('content-length')[0]);
        header('Accept-Ranges: '.$x->getHeader('Accept-Ranges')[0]);

        if (!$stream) {
            header('Content-Disposition: '.$x->getHeader('Content-Disposition')[0]);
        }
        echo $x->getBody();
    }
public function getRaw ( $ stream = false ) { $ this -> setTokenValue ( $ this -> getEntityIdName ( ) , $ this -> getId ( ) ) ; $ uri = $ this -> getURI ( '/raw' ) ; $ x = $ this -> getSDK ( ) -> get ( $ uri , array ( ) , array ( 'accept' => 'audio/*' , 'content_type' => 'audio/*' , 'Range' => 'bytes' ) ) ; header ( 'Content-Type: ' . $ x -> getHeader ( 'Content-Type' ) [ 0 ] ) ; header ( 'content-length: ' . $ x -> getHeader ( 'content-length' ) [ 0 ] ) ; header ( 'Accept-Ranges: ' . $ x -> getHeader ( 'Accept-Ranges' ) [ 0 ] ) ; if ( ! $ stream ) { header ( 'Content-Disposition: ' . $ x -> getHeader ( 'Content-Disposition' ) [ 0 ] ) ; } echo $ x -> getBody ( ) ; }
downloads or streams a media file
@param  boolean $stream  Set to true to stream the file
@return binary           Media file
downloads or streams a media file