/library/Zend/View/Helper/HtmlQuicktime.php

https://bitbucket.org/hamidrezas/melobit · PHP · 82 lines · 16 code · 8 blank · 58 comment · 0 complexity · 31ba5727276f1fd7d848731ede5e87c0 MD5 · raw file

  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: HtmlQuicktime.php 24594 2012-01-05 21:27:01Z matthew $
  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_HtmlQuicktime extends Zend_View_Helper_HtmlObject
  34. {
  35. /**
  36. * Default file type for a movie applet
  37. *
  38. */
  39. const TYPE = 'video/quicktime';
  40. /**
  41. * Object classid
  42. *
  43. */
  44. const ATTRIB_CLASSID = 'clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B';
  45. /**
  46. * Object Codebase
  47. *
  48. */
  49. const ATTRIB_CODEBASE = 'http://www.apple.com/qtactivex/qtplugin.cab';
  50. /**
  51. * Default attributes
  52. *
  53. * @var array
  54. */
  55. protected $_attribs = array('classid' => self::ATTRIB_CLASSID,
  56. 'codebase' => self::ATTRIB_CODEBASE);
  57. /**
  58. * Output a quicktime movie object tag
  59. *
  60. * @param string $data The quicktime file
  61. * @param array $attribs Attribs for the object tag
  62. * @param array $params Params for in the object tag
  63. * @param string $content Alternative content
  64. * @return string
  65. */
  66. public function htmlQuicktime($data, array $attribs = array(), array $params = array(), $content = null)
  67. {
  68. // Attrs
  69. $attribs = array_merge($this->_attribs, $attribs);
  70. // Params
  71. $params = array_merge(array('src' => $data), $params);
  72. return $this->htmlObject($data, self::TYPE, $attribs, $params, $content);
  73. }
  74. }