Joomla Platform  13.1
Documentation des API du framework Joomla Platform
 Tout Classes Espaces de nommage Fichiers Fonctions Variables Pages
renderer.php
Aller à la documentation de ce fichier.
1 <?php
2 /**
3  * @package Joomla.Platform
4  * @subpackage Document
5  *
6  * @copyright Copyright (C) 2005 - 2013 Open Source Matters, Inc. All rights reserved.
7  * @license GNU General Public License version 2 or later; see LICENSE
8  */
9 
10 defined('JPATH_PLATFORM') or die;
11 
12 /**
13  * Abstract class for a renderer
14  *
15  * @package Joomla.Platform
16  * @subpackage Document
17  * @since 11.1
18  */
20 {
21  /**
22  * Reference to the JDocument object that instantiated the renderer
23  *
24  * @var JDocument
25  * @since 11.1
26  */
27  protected $_doc = null;
28 
29  /**
30  * Renderer mime type
31  *
32  * @var string
33  * @since 11.1
34  */
35  protected $_mime = "text/html";
36 
37  /**
38  * Class constructor
39  *
40  * @param JDocument $doc A reference to the JDocument object that instantiated the renderer
41  *
42  * @since 11.1
43  */
44  public function __construct(JDocument $doc)
45  {
46  $this->_doc = $doc;
47  }
48 
49  /**
50  * Renders a script and returns the results as a string
51  *
52  * @param string $name The name of the element to render
53  * @param array $params Array of values
54  * @param string $content Override the output of the renderer
55  *
56  * @return string The output of the script
57  *
58  * @since 11.1
59  */
60  public function render($name, $params = null, $content = null)
61  {
62  }
63 
64  /**
65  * Return the content type of the renderer
66  *
67  * @return string The contentType
68  *
69  * @since 11.1
70  */
71  public function getContentType()
72  {
73  return $this->_mime;
74  }
75 }