2
0

HtmlPage.php 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  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_HtmlPage extends Zend_View_Helper_HtmlObject
  34. {
  35. /**
  36. * Default file type for html
  37. *
  38. */
  39. const TYPE = 'text/html';
  40. /**
  41. * Object classid
  42. *
  43. */
  44. const ATTRIB_CLASSID = 'clsid:25336920-03F9-11CF-8FD0-00AA00686F13';
  45. /**
  46. * Default attributes
  47. *
  48. * @var array
  49. */
  50. protected $_attribs = array('classid' => self::ATTRIB_CLASSID);
  51. /**
  52. * Output a html object tag
  53. *
  54. * @param string $data The html url
  55. * @param array $attribs Attribs for the object tag
  56. * @param array $params Params for in the object tag
  57. * @param string $content Alternative content
  58. * @return string
  59. */
  60. public function htmlPage($data, array $attribs = array(), array $params = array(), $content = null)
  61. {
  62. // Attrs
  63. $attribs = array_merge($this->_attribs, $attribs);
  64. // Params
  65. $params = array_merge(array('data' => $data), $params);
  66. return $this->htmlObject($data, self::TYPE, $attribs, $params, $content);
  67. }
  68. }