1<?php 2 3/** 4 * OrangeHRM is a comprehensive Human Resource Management (HRM) System that captures 5 * all the essential functionalities required for any enterprise. 6 * Copyright (C) 2006 OrangeHRM Inc., http://www.orangehrm.com 7 * 8 * OrangeHRM is free software; you can redistribute it and/or modify it under the terms of 9 * the GNU General Public License as published by the Free Software Foundation; either 10 * version 2 of the License, or (at your option) any later version. 11 * 12 * OrangeHRM is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; 13 * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 14 * See the GNU General Public License for more details. 15 * 16 * You should have received a copy of the GNU General Public License along with this program; 17 * if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 18 * Boston, MA 02110-1301, USA 19 */ 20class RegistrationEventProcessorFactory 21{ 22 public function getRegistrationEventProcessor(int $eventType) 23 { 24 if ($eventType == RegistrationEventQueue::INSTALLATION_START) { 25 return new RegistrationStartEventProcessor(); 26 }elseif ($eventType == RegistrationEventQueue::ACTIVE_EMPLOYEE_COUNT){ 27 return new RegistrationEmployeeActivationEventProcessor(); 28 }elseif ($eventType == RegistrationEventQueue::INACTIVE_EMPLOYEE_COUNT){ 29 return new RegistrationEmployeeTerminationEventProcessor(); 30 }elseif ($eventType == RegistrationEventQueue::INSTALLATION_SUCCESS){ 31 return new RegistrationSuccessEventProcessor(); 32 }elseif ($eventType == RegistrationEventQueue::UPGRADE_START){ 33 return new RegistrationUpgradeEventProcessor(); 34 } 35 return null; 36 } 37} 38