Skip to content

Instantly share code, notes, and snippets.

@rummelonp
Created July 30, 2010 08:58
Show Gist options
  • Save rummelonp/500188 to your computer and use it in GitHub Desktop.
Save rummelonp/500188 to your computer and use it in GitHub Desktop.
<?php
class sfFlashRenderer extends FlashRenderer
{
public function render($context = null)
{
if (count($this->replaces) > 0) {
$this->flash = self::rewrite($this->flash, $this->replaces);
}
if (is_null($context)) {
$context = sfContext::getInstance();
}
$response = $context->getResponse();
$response->setHttpHeader('Content-Length', strlen($this->flash));
$response->setContentType('application/x-shockwave-flash');
$response->setContent($this->flash);
return sfView::NONE;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment