[TASK] Shorten namespaces in ContentObjects
[Packages/TYPO3.CMS.git] / typo3 / sysext / frontend / Classes / ContentObject / AbstractContentObject.php
1 <?php
2 namespace TYPO3\CMS\Frontend\ContentObject;
3
4 /*
5 * This file is part of the TYPO3 CMS project.
6 *
7 * It is free software; you can redistribute it and/or modify it under
8 * the terms of the GNU General Public License, either version 2
9 * of the License, or any later version.
10 *
11 * For the full copyright and license information, please read the
12 * LICENSE.txt file that was distributed with this source code.
13 *
14 * The TYPO3 project - inspiring people to share!
15 */
16 use TYPO3\CMS\Core\Resource\ResourceFactory;
17
18 /**
19 * Contains an abstract class for all tslib content class implementations.
20 *
21 * @author Xavier Perseguers <typo3@perseguers.ch>
22 * @author Steffen Kamper <steffen@typo3.org>
23 */
24 abstract class AbstractContentObject {
25
26 /**
27 * @var ContentObjectRenderer
28 */
29 protected $cObj;
30
31 /**
32 * @var ResourceFactory
33 */
34 protected $fileFactory = NULL;
35
36 /**
37 * Default constructor.
38 *
39 * @param ContentObjectRenderer $cObj
40 */
41 public function __construct(ContentObjectRenderer $cObj) {
42 $this->cObj = $cObj;
43 $this->fileFactory = ResourceFactory::getInstance();
44 }
45
46 /**
47 * Renders the content object.
48 *
49 * @param array $conf
50 * @return string
51 */
52 abstract public function render($conf = array());
53
54 /**
55 * Getter for current cObj
56 *
57 * @return ContentObjectRenderer
58 */
59 public function getContentObject() {
60 return $this->cObj;
61 }
62
63 }