2
0

HtmlFlash.php 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. <?php
  2. /**
  3. * Zend Framework
  4. *
  5. * LICENSE
  6. *
  7. * This source file is subject to the new BSD license that is bundled
  8. * with this package in the file LICENSE.txt.
  9. * It is also available through the world-wide-web at this URL:
  10. * http://framework.zend.com/license/new-bsd
  11. * If you did not receive a copy of the license and are unable to
  12. * obtain it through the world-wide-web, please send an email
  13. * to license@zend.com so we can send you a copy immediately.
  14. *
  15. * @category Zend
  16. * @package Zend_View
  17. * @subpackage Helper
  18. * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
  19. * @license http://framework.zend.com/license/new-bsd New BSD License
  20. * @version $Id$
  21. */
  22. /**
  23. * @see Zend_View_Helper_HtmlObject
  24. */
  25. require_once 'Zend/View/Helper/HtmlObject.php';
  26. /**
  27. * @category Zend
  28. * @package Zend_View
  29. * @subpackage Helper
  30. * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
  31. * @license http://framework.zend.com/license/new-bsd New BSD License
  32. */
  33. class Zend_View_Helper_HtmlFlash extends Zend_View_Helper_HtmlObject
  34. {
  35. /**
  36. * Default file type for a flash applet
  37. *
  38. */
  39. const TYPE = 'application/x-shockwave-flash';
  40. /**
  41. * Output a flash movie object tag
  42. *
  43. * @param string $data The flash file
  44. * @param array $attribs Attribs for the object tag
  45. * @param array $params Params for in the object tag
  46. * @param string $content Alternative content
  47. * @return string
  48. */
  49. public function htmlFlash($data, array $attribs = array(), array $params = array(), $content = null)
  50. {
  51. // Params
  52. $params = array_merge(array('movie' => $data,
  53. 'quality' => 'high'), $params);
  54. return $this->htmlObject($data, self::TYPE, $attribs, $params, $content);
  55. }
  56. }