/library/Zend/View/Helper/HtmlQuicktime.php
PHP | 82 lines | 16 code | 8 blank | 58 comment | 0 complexity | 31ba5727276f1fd7d848731ede5e87c0 MD5 | raw file
Possible License(s): AGPL-1.0
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/**
24 * @see Zend_View_Helper_HtmlObject
25 */
26require_once 'Zend/View/Helper/HtmlObject.php';
27
28/**
29 * @category Zend
30 * @package Zend_View
31 * @subpackage Helper
32 * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
33 * @license http://framework.zend.com/license/new-bsd New BSD License
34 */
35class Zend_View_Helper_HtmlQuicktime extends Zend_View_Helper_HtmlObject
36{
37 /**
38 * Default file type for a movie applet
39 *
40 */
41 const TYPE = 'video/quicktime';
42
43 /**
44 * Object classid
45 *
46 */
47 const ATTRIB_CLASSID = 'clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B';
48
49 /**
50 * Object Codebase
51 *
52 */
53 const ATTRIB_CODEBASE = 'http://www.apple.com/qtactivex/qtplugin.cab';
54
55 /**
56 * Default attributes
57 *
58 * @var array
59 */
60 protected $_attribs = array('classid' => self::ATTRIB_CLASSID,
61 'codebase' => self::ATTRIB_CODEBASE);
62
63 /**
64 * Output a quicktime movie object tag
65 *
66 * @param string $data The quicktime file
67 * @param array $attribs Attribs for the object tag
68 * @param array $params Params for in the object tag
69 * @param string $content Alternative content
70 * @return string
71 */
72 public function htmlQuicktime($data, array $attribs = array(), array $params = array(), $content = null)
73 {
74 // Attrs
75 $attribs = array_merge($this->_attribs, $attribs);
76
77 // Params
78 $params = array_merge(array('src' => $data), $params);
79
80 return $this->htmlObject($data, self::TYPE, $attribs, $params, $content);
81 }
82}