| @@ 16-57 (lines=42) @@ | ||
| 13 | * Class CasesConfigurationFactory |
|
| 14 | * @package OmnideskBundle\Factory\Cases |
|
| 15 | */ |
|
| 16 | class CasesConfigurationFactory extends AbstractConfigurationFactory |
|
| 17 | { |
|
| 18 | /** |
|
| 19 | * CasesConfigurationFactory constructor. |
|
| 20 | * @param AddCasesRequestConfiguration $addConfiguration |
|
| 21 | * @param EditCasesRequestConfiguration $editConfiguration |
|
| 22 | * @param ListCasesRequestConfiguration $listConfiguration |
|
| 23 | * @param ViewCasesRequestConfiguration $viewConfiguration |
|
| 24 | */ |
|
| 25 | public function __construct( |
|
| 26 | AddCasesRequestConfiguration $addConfiguration, |
|
| 27 | EditCasesRequestConfiguration $editConfiguration, |
|
| 28 | ListCasesRequestConfiguration $listConfiguration, |
|
| 29 | ViewCasesRequestConfiguration $viewConfiguration |
|
| 30 | ) { |
|
| 31 | $this->addConfiguration = $addConfiguration; |
|
| 32 | $this->editConfiguration = $editConfiguration; |
|
| 33 | $this->listConfiguration = $listConfiguration; |
|
| 34 | $this->viewConfiguration = $viewConfiguration; |
|
| 35 | } |
|
| 36 | ||
| 37 | /** |
|
| 38 | * @param string $type |
|
| 39 | * @return ConfigurationInterface |
|
| 40 | * @throws BadConfigurationFactoryException |
|
| 41 | */ |
|
| 42 | public function get($type) |
|
| 43 | { |
|
| 44 | switch ($type) { |
|
| 45 | case self::CONFIGURATION_ADD: |
|
| 46 | return $this->addConfiguration; |
|
| 47 | case self::CONFIGURATION_EDIT: |
|
| 48 | return $this->editConfiguration; |
|
| 49 | case self::CONFIGURATION_LIST: |
|
| 50 | return $this->listConfiguration; |
|
| 51 | case self::CONFIGURATION_VIEW: |
|
| 52 | return $this->viewConfiguration; |
|
| 53 | default: |
|
| 54 | throw new BadConfigurationFactoryException(); |
|
| 55 | } |
|
| 56 | } |
|
| 57 | } |
|
| 58 | ||
| @@ 16-57 (lines=42) @@ | ||
| 13 | * Class StaffConfigurationFactory |
|
| 14 | * @package OmnideskBundle\Factory\Staff |
|
| 15 | */ |
|
| 16 | class StaffConfigurationFactory extends AbstractConfigurationFactory |
|
| 17 | { |
|
| 18 | /** |
|
| 19 | * StaffConfigurationFactory constructor. |
|
| 20 | * @param AddStaffRequestConfiguration $addConfiguration |
|
| 21 | * @param EditStaffRequestConfiguration $editConfiguration |
|
| 22 | * @param ListStaffRequestConfiguration $listConfiguration |
|
| 23 | * @param ViewStaffRequestConfiguration $viewConfiguration |
|
| 24 | */ |
|
| 25 | public function __construct( |
|
| 26 | AddStaffRequestConfiguration $addConfiguration, |
|
| 27 | EditStaffRequestConfiguration $editConfiguration, |
|
| 28 | ListStaffRequestConfiguration $listConfiguration, |
|
| 29 | ViewStaffRequestConfiguration $viewConfiguration |
|
| 30 | ) { |
|
| 31 | $this->addConfiguration = $addConfiguration; |
|
| 32 | $this->editConfiguration = $editConfiguration; |
|
| 33 | $this->listConfiguration = $listConfiguration; |
|
| 34 | $this->viewConfiguration = $viewConfiguration; |
|
| 35 | } |
|
| 36 | ||
| 37 | /** |
|
| 38 | * @param string $type |
|
| 39 | * @return ConfigurationInterface |
|
| 40 | * @throws BadConfigurationFactoryException |
|
| 41 | */ |
|
| 42 | public function get($type) |
|
| 43 | { |
|
| 44 | switch ($type) { |
|
| 45 | case self::CONFIGURATION_ADD: |
|
| 46 | return $this->addConfiguration; |
|
| 47 | case self::CONFIGURATION_EDIT: |
|
| 48 | return $this->editConfiguration; |
|
| 49 | case self::CONFIGURATION_LIST: |
|
| 50 | return $this->listConfiguration; |
|
| 51 | case self::CONFIGURATION_VIEW: |
|
| 52 | return $this->viewConfiguration; |
|
| 53 | default: |
|
| 54 | throw new BadConfigurationFactoryException(); |
|
| 55 | } |
|
| 56 | } |
|
| 57 | } |
|
| 58 | ||
| @@ 16-57 (lines=42) @@ | ||
| 13 | * Class UserConfigurationFactory |
|
| 14 | * @package OmnideskBundle\Factory\User |
|
| 15 | */ |
|
| 16 | class UserConfigurationFactory extends AbstractConfigurationFactory |
|
| 17 | { |
|
| 18 | /** |
|
| 19 | * UserConfigurationFactory constructor. |
|
| 20 | * @param AddUserRequestConfiguration $addConfiguration |
|
| 21 | * @param EditUserRequestConfiguration $editConfiguration |
|
| 22 | * @param ListUserRequestConfiguration $listConfiguration |
|
| 23 | * @param ViewUserRequestConfiguration $viewConfiguration |
|
| 24 | */ |
|
| 25 | public function __construct( |
|
| 26 | AddUserRequestConfiguration $addConfiguration, |
|
| 27 | EditUserRequestConfiguration $editConfiguration, |
|
| 28 | ListUserRequestConfiguration $listConfiguration, |
|
| 29 | ViewUserRequestConfiguration $viewConfiguration |
|
| 30 | ) { |
|
| 31 | $this->addConfiguration = $addConfiguration; |
|
| 32 | $this->editConfiguration = $editConfiguration; |
|
| 33 | $this->listConfiguration = $listConfiguration; |
|
| 34 | $this->viewConfiguration = $viewConfiguration; |
|
| 35 | } |
|
| 36 | ||
| 37 | /** |
|
| 38 | * @param string $type |
|
| 39 | * @return ConfigurationInterface |
|
| 40 | * @throws BadConfigurationFactoryException |
|
| 41 | */ |
|
| 42 | public function get($type) |
|
| 43 | { |
|
| 44 | switch ($type) { |
|
| 45 | case self::CONFIGURATION_ADD: |
|
| 46 | return $this->addConfiguration; |
|
| 47 | case self::CONFIGURATION_EDIT: |
|
| 48 | return $this->editConfiguration; |
|
| 49 | case self::CONFIGURATION_LIST: |
|
| 50 | return $this->listConfiguration; |
|
| 51 | case self::CONFIGURATION_VIEW: |
|
| 52 | return $this->viewConfiguration; |
|
| 53 | default: |
|
| 54 | throw new BadConfigurationFactoryException(); |
|
| 55 | } |
|
| 56 | } |
|
| 57 | } |
|
| 58 | ||
| @@ 16-57 (lines=42) @@ | ||
| 13 | * Class GroupConfigurationFactory |
|
| 14 | * @package OmnideskBundle\Factory\Group |
|
| 15 | */ |
|
| 16 | class GroupConfigurationFactory extends AbstractConfigurationFactory |
|
| 17 | { |
|
| 18 | /** |
|
| 19 | * GroupConfigurationFactory constructor. |
|
| 20 | * @param AddGroupRequestConfiguration $addConfiguration |
|
| 21 | * @param EditGroupRequestConfiguration $editConfiguration |
|
| 22 | * @param ListGroupRequestConfiguration $listConfiguration |
|
| 23 | * @param ViewGroupRequestConfiguration $viewConfiguration |
|
| 24 | */ |
|
| 25 | public function __construct( |
|
| 26 | AddGroupRequestConfiguration $addConfiguration, |
|
| 27 | EditGroupRequestConfiguration $editConfiguration, |
|
| 28 | ListGroupRequestConfiguration $listConfiguration, |
|
| 29 | ViewGroupRequestConfiguration $viewConfiguration |
|
| 30 | ) { |
|
| 31 | $this->addConfiguration = $addConfiguration; |
|
| 32 | $this->editConfiguration = $editConfiguration; |
|
| 33 | $this->listConfiguration = $listConfiguration; |
|
| 34 | $this->viewConfiguration = $viewConfiguration; |
|
| 35 | } |
|
| 36 | ||
| 37 | /** |
|
| 38 | * @param string $type |
|
| 39 | * @return ConfigurationInterface |
|
| 40 | * @throws BadConfigurationFactoryException |
|
| 41 | */ |
|
| 42 | public function get($type) |
|
| 43 | { |
|
| 44 | switch ($type) { |
|
| 45 | case self::CONFIGURATION_ADD: |
|
| 46 | return $this->addConfiguration; |
|
| 47 | case self::CONFIGURATION_EDIT: |
|
| 48 | return $this->editConfiguration; |
|
| 49 | case self::CONFIGURATION_LIST: |
|
| 50 | return $this->listConfiguration; |
|
| 51 | case self::CONFIGURATION_VIEW: |
|
| 52 | return $this->viewConfiguration; |
|
| 53 | } |
|
| 54 | ||
| 55 | throw new BadConfigurationFactoryException(); |
|
| 56 | } |
|
| 57 | } |
|
| 58 | ||