Follow-up to use object manager to create object instances
[TYPO3CMS/Extensions/sr_freecap.git] / Resources / Private / Eid / EidDispatcher.php
1 <?php
2 /***************************************************************
3 * Copyright notice
4 *
5 * 2010 Daniel Lienert <daniel@lienert.cc>, Michael Knoll <mimi@kaktusteam.de>
6 * 2012 Stanislas Rolland <typo3(arobas)sjbr.ca>
7 * All rights reserved
8 *
9 *
10 * This script is part of the TYPO3 project. The TYPO3 project is
11 * free software; you can redistribute it and/or modify
12 * it under the terms of the GNU General Public License as published by
13 * the Free Software Foundation; either version 2 of the License, or
14 * (at your option) any later version.
15 *
16 * The GNU General Public License can be found at
17 * http://www.gnu.org/copyleft/gpl.html.
18 *
19 * This script is distributed in the hope that it will be useful,
20 * but WITHOUT ANY WARRANTY; without even the implied warranty of
21 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
22 * GNU General Public License for more details.
23 *
24 * This copyright notice MUST APPEAR in all copies of the script!
25 ***************************************************************/
26 /**
27 * This script loads the required environment to dispatch an extbase call
28 *
29 * Include this script in ext_localconf:
30 * $GLOBALS['TYPO3_CONF_VARS']['FE']['eID_include']['sr_freecap_EidDispatcher'] = \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extPath('sr_freecap') . 'Resources/Private/Eid/EidDispatcher.php'
31 *
32 * @author Daniel Lienert <daniel@lienert.cc>
33 * @author Stanislas Rolland <typo3(arobas)sjbr.ca>
34 */
35 // Exit, if script is called directly
36 if (!defined('TYPO3_MODE') || TYPO3_MODE !== 'FE') {
37 die('Could not access this script directly!');
38 }
39 /** @var $objectManager \TYPO3\CMS\Extbase\Object\ObjectManagerInterface */
40 $objectManager = new \TYPO3\CMS\Extbase\Object\ObjectManager();
41 // Handover to the Eid Utility Object
42 /** @var $dispatcher SJBR\SrFreecap\Utility\EidUtility */
43 $dispatcher = $objectManager->get('SJBR\\SrFreecap\\Utility\\EidUtility');
44 echo $dispatcher->initAndDispatch();
45 ?>