twitcode.org
 
back extbase settings in service
PHP
2011-12-23
mhuber84


inject typoscript settings to services, repositories, ...
Copy code copy code
  1. <?php
  2.  
  3. /***************************************************************
  4.  *  Copyright notice
  5.  *  (c) 2011 Dirk Hahn <dirk.hahn@bgm-gmbh.de>, bgm GmbH & Co. KG
  6.  *  Markus Wagner <markus.wagner@bgm-gmbh.de>, bgm GmbH & Co. KG
  7.  *  Marco Huber <marco.huber@bgm-gmbh.de>, bgm GmbH & Co. KG
  8.  *  All rights reserved
  9.  *  This script is part of the TYPO3 project. The TYPO3 project is
  10.  *  free software; you can redistribute it and/or modify
  11.  *  it under the terms of the GNU General Public License as published by
  12.  *  the Free Software Foundation; either version 3 of the License, or
  13.  *  (at your option) any later version.
  14.  *  The GNU General Public License can be found at
  15.  *  http://www.gnu.org/copyleft/gpl.html.
  16.  *  This script is distributed in the hope that it will be useful,
  17.  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
  18.  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  19.  *  GNU General Public License for more details.
  20.  *  This copyright notice MUST APPEAR in all copies of the script!
  21.  ***************************************************************/
  22.  
  23. /**
  24.  * @package syncserver
  25.  * @license http://www.gnu.org/licenses/lgpl.html GNU Lesser General Public License, version 3 or later
  26.  
  27.  */
  28. class Tx_Syncserver_Service_AbstractService implements t3lib_Singleton {
  29.  
  30.         /**
  31.          * settings
  32.          *
  33.          * @var array $settings
  34.          */
  35.         protected $settings;
  36.  
  37.         /**
  38.          * @var Tx_Extbase_Configuration_ConfigurationManagerInterface
  39.          */
  40.         protected $configurationManager;
  41.  
  42.         /**
  43.          * Injects the Configuration Manager
  44.          *
  45.          * @param Tx_Extbase_Configuration_ConfigurationManagerInterface An instance of the Configuration Manager
  46.          * @return void
  47.          */
  48.         public function injectConfigurationManager(Tx_Extbase_Configuration_ConfigurationManagerInterface $configurationManager) {
  49.                 $this->configurationManager = $configurationManager;
  50.         }
  51.  
  52.         /**
  53.          *
  54.          */
  55.         public function initializeObject(){
  56.                 $this->settings = $this->configurationManager->getConfiguration('Settings', 'Syncserver', 'syncserver');
  57.         }
  58. }
  59.  
  60. ?>

TYPOSCRIPT  EXTBASE  SETTINGS 

Recent comments: ( 0 )


Please loggin to leave a comment!!