public function downloadAction($path)
    {
        try {
            $this->setPath($path);
        } catch (NotFoundException $e) {
            throw $e;
        }

        $dbfile = new WDBFile($this->getpath());
        if (!$dbfile->isFile()) {
            throw new NotFoundException(
                'Can not send raw content of a directory!',
                0, null, TemplateHelper::getRoute($dbfile->getWDBPath())
            );
        }

        $this->wdb->getResponse()
            ->download($path, 'text/plain');
        exit(0);
    }
public function downloadAction($path)
    {
        try {
            $this->setPath($path);
        } catch (NotFoundException $e) {
            throw $e;
        }

        $dbfile = new WDBFile($this->getpath());
        if (!$dbfile->isFile()) {
            throw new NotFoundException(
                'Can not send raw content of a directory!',
                0, null, TemplateHelper::getRoute($dbfile->getWDBPath())
            );
        }

        $this->wdb->getResponse()
            ->download($path, 'text/plain');
        exit(0);
    }
public function downloadAction ( $ path ) { try { $ this -> setPath ( $ path ) ; } catch ( NotFoundException $ e ) { throw $ e ; } $ dbfile = new WDBFile ( $ this -> getpath ( ) ) ; if ( ! $ dbfile -> isFile ( ) ) { throw new NotFoundException ( 'Can not send raw content of a directory!' , 0 , null , TemplateHelper :: getRoute ( $ dbfile -> getWDBPath ( ) ) ) ; } $ this -> wdb -> getResponse ( ) -> download ( $ path , 'text/plain' ) ; exit ( 0 ) ; }
Download action of a path

@param string $path
@throws \WebDocBook\Exception\NotFoundException
Download action of a path