/home/desid573/book.familycab.com.au/pdd/lib/Cake/View
NameSizeModeActions
Elements/-0755rm
Errors/-0755rm
Helper/-0755rm
Scaffolds/-0755rm
Helper.php288410644editdlrm
HelperCollection.php66080644editdlrm
JsonView.php54000644editdlrm
MediaView.php32620644editdlrm
ScaffoldView.php24250644editdlrm
ThemeView.php9180644editdlrm
View.php354810644editdlrm
ViewBlock.php60340644editdlrm
XmlView.php44200644editdlrm
Edit: /home/desid573/book.familycab.com.au/pdd/lib/Cake/View/MediaView.php (3262B)
'text/plain') * * ### Usage * * ``` * class ExampleController extends AppController { * public function download() { * $this->viewClass = 'Media'; * $params = array( * 'id' => 'example.zip', * 'name' => 'example', * 'download' => true, * 'extension' => 'zip', * 'path' => APP . 'files' . DS * ); * $this->set($params); * } * } * ``` * * @package Cake.View * @deprecated 3.0.0 Deprecated since version 2.3, use CakeResponse::file() instead */ class MediaView extends View { /** * Display or download the given file * * @param string $view Not used * @param string $layout Not used * @return void */ public function render($view = null, $layout = null) { $name = $extension = $download = $id = $modified = $path = $cache = $mimeType = $compress = null; extract($this->viewVars, EXTR_OVERWRITE); $path = $path . $id; if (is_array($mimeType)) { $this->response->type($mimeType); } if ($cache) { if (!empty($modified) && !is_numeric($modified)) { $modified = strtotime($modified, time()); } else { $modified = time(); } $this->response->cache($modified, $cache); } else { $this->response->disableCache(); } if ($name !== null) { if (empty($extension)) { $extension = pathinfo($id, PATHINFO_EXTENSION); } if (!empty($extension)) { $name .= '.' . $extension; } } $this->response->file($path, compact('name', 'download')); if ($compress) { $this->response->compress(); } } }