Overview
  • Package
  • Class
  • Tree
  • Todo

Packages

  • AddonValue
    • Interfaces
  • ApiV2Controllers
  • Category
    • Collections
    • Entities
    • Factories
    • Interfaces
    • Providers
    • Repositories
    • Storages
  • Customer
    • Address
    • Country
    • CountryZone
    • Interfaces
    • Validation
    • ValueObjects
  • Email
    • Collections
    • Entities
    • Exceptions
    • Interfaces
    • Repository
    • ValueObjects
  • Http
    • Collections
    • Exceptions
    • Factories
    • Interfaces
    • ValueObjects
  • Loaders
    • CrossCuttingLoader
    • GXCoreLoader
    • Interfaces
  • None
  • Order
    • Collections
    • Entities
    • Factories
    • Interfaces
    • Repositories
    • Storages
    • ValueObjects
  • Product
    • Collections
    • Entities
    • Factories
    • Interfaces
    • Providers
    • Repositories
    • Storages
  • ProductModule
    • Collections
    • Deleter
    • Entities
    • Factories
    • Interface
    • Interfaces
    • Reader
    • Repositories
    • Writer
  • Shared
    • Exceptions
    • FileSystem
    • Interfaces
    • Storage
    • Types
  • Statistics
    • Interfaces
  • UserConfiguration
    • Interfaces
    • Repository

Classes

  • AbstractAddonValueServiceFactory
  • AbstractAddonValueStorage
  • AbstractApiV2Controller
  • AbstractCategoryServiceFactory
  • AbstractCollection
  • AbstractCustomerFactory
  • AbstractCustomerServiceFactory
  • AbstractFileStorage
  • AbstractHttpContextFactory
  • AbstractHttpViewControllerRegistryFactory
  • AbstractImagesApiV2Controller
  • AbstractOrderServiceFactory
  • AbstractProductAttributeServiceFactory
  • AbstractProductServiceFactory
  • AddonValueService
  • AddonValueServiceFactory
  • AddonValueStorageFactory
  • AddressBlock
  • AddressBookService
  • AddressClass
  • AddressesApiV2Controller
  • AddressFormatProvider
  • AdminHttpViewController
  • AdminPageHttpControllerResponse
  • Asset
  • AssetCollection
  • AttachmentCollection
  • AttachmentName
  • AttachmentPath
  • AttachmentsApiV2Controller
  • AttachmentsHandler
  • BoolType
  • CategoriesApiV2Controller
  • Category
  • CategoryAddonValueStorage
  • CategoryFactory
  • CategoryIconsApiV2Controller
  • CategoryImagesApiV2Controller
  • CategoryListItem
  • CategoryListItemCollection
  • CategoryListProvider
  • CategoryListProviderFactory
  • CategoryObjectService
  • CategoryReadService
  • CategoryRepository
  • CategoryRepositoryDeleter
  • CategoryRepositoryReader
  • CategoryRepositoryWriter
  • CategoryServiceFactory
  • CategorySettings
  • CategorySettingsRepository
  • CategorySettingsRepositoryReader
  • CategorySettingsRepositoryWriter
  • CategoryWriteService
  • ContactCollection
  • ContactName
  • ContactType
  • CountriesApiV2Controller
  • CountryService
  • CrossCuttingLoader
  • CurrencyCode
  • Customer
  • CustomerAccountInputValidator
  • CustomerAddress
  • CustomerAddressDeleter
  • CustomerAddressInputValidator
  • CustomerAddressReader
  • CustomerAddressRepository
  • CustomerAddressWriter
  • CustomerB2BStatus
  • CustomerCallNumber
  • CustomerCity
  • CustomerCompany
  • CustomerCountry
  • CustomerCountryIso2
  • CustomerCountryIso3
  • CustomerCountryName
  • CustomerCountryReader
  • CustomerCountryRepository
  • CustomerCountryZone
  • CustomerCountryZoneIsoCode
  • CustomerCountryZoneName
  • CustomerCountryZoneReader
  • CustomerCountryZoneRepository
  • CustomerDateOfBirth
  • CustomerDeleter
  • CustomerEmail
  • CustomerFactory
  • CustomerFirstname
  • CustomerGender
  • CustomerInputValidator
  • CustomerInputValidatorSettings
  • CustomerLastname
  • CustomerNumber
  • CustomerPassword
  • CustomerPostcode
  • CustomerReader
  • CustomerReadService
  • CustomerRegistrationInputValidatorService
  • CustomerRepository
  • CustomersApiV2Controller
  • CustomerService
  • CustomerServiceFactory
  • CustomerServiceSettings
  • CustomerStatusInformation
  • CustomerStatusProvider
  • CustomerStreet
  • CustomerSuburb
  • CustomerVatNumber
  • CustomerWriter
  • CustomerWriteService
  • DecimalType
  • DefaultApiV2Controller
  • EditableCollection
  • EditableKeyValueCollection
  • Email
  • EmailAddress
  • EmailAttachment
  • EmailCollection
  • EmailContact
  • EmailContent
  • EmailDeleter
  • EmailFactory
  • EmailReader
  • EmailRepository
  • EmailsApiV2Controller
  • EmailService
  • EmailStringType
  • EmailSubject
  • EmailWriter
  • EmptyCurrencyCode
  • EmptyDateTime
  • EmptyLanguageCode
  • EmptyOrderItemDownloadInformation
  • EmptyProductImage
  • EnvCategoryServiceSettings
  • EnvironmentHttpContextFactory
  • EnvironmentHttpViewControllerRegistryFactory
  • EnvProductImageFileStorageSettings
  • ExistingDirectory
  • ExistingFile
  • FilenameStringType
  • GXCoreLoader
  • GXCoreLoaderSettings
  • GXEngineOrder
  • GXEngineProduct
  • HttpApiV2Controller
  • HttpContext
  • HttpContextReader
  • HttpControllerResponse
  • HttpDispatcher
  • HttpResponseProcessor
  • HttpService
  • HttpServiceFactory
  • HttpViewController
  • HttpViewControllerFactory
  • HttpViewControllerRegistry
  • IdCollection
  • IdType
  • ImageFileStorage
  • IntType
  • JsonHttpControllerResponse
  • KeyValueCollection
  • LanguageCode
  • LegacyProductImageProcessing
  • MailerAdapter
  • NonEmptyStringType
  • OrderAddonValueStorage
  • OrderFactory
  • OrderItem
  • OrderItemAddonValueStorage
  • OrderItemAttribute
  • OrderItemAttributeCollection
  • OrderItemAttributeFactory
  • OrderItemAttributeRepository
  • OrderItemAttributeRepositoryDeleter
  • OrderItemAttributeRepositoryFactory
  • OrderItemAttributeRepositoryReader
  • OrderItemAttributeRepositoryWriter
  • OrderItemCollection
  • OrderItemDownloadInformation
  • OrderItemFactory
  • OrderItemProperty
  • OrderItemPropertyFactory
  • OrderItemPropertyRepository
  • OrderItemPropertyRepositoryDeleter
  • OrderItemPropertyRepositoryReader
  • OrderItemPropertyRepositoryWriter
  • OrderItemRepository
  • OrderItemRepositoryDeleter
  • OrderItemRepositoryReader
  • OrderItemRepositoryWriter
  • OrderListGenerator
  • OrderListItem
  • OrderListItemCollection
  • OrderObjectService
  • OrderPaymentType
  • OrderReadService
  • OrderRepository
  • OrderRepositoryDeleter
  • OrderRepositoryReader
  • OrderRepositoryWriter
  • OrdersApiV2Controller
  • OrderServiceFactory
  • OrderServiceSettings
  • OrderShippingType
  • OrdersHistoryApiV2Controller
  • OrdersItemsApiV2Controller
  • OrdersItemsAttributesApiV2Controller
  • OrderStatusHistoryListItem
  • OrderStatusHistoryListItemCollection
  • OrderStatusHistoryStorage
  • OrdersTotalsApiV2Controller
  • OrderTotal
  • OrderTotalCollection
  • OrderTotalFactory
  • OrderTotalRepository
  • OrderTotalRepositoryDeleter
  • OrderTotalRepositoryReader
  • OrderTotalRepositoryWriter
  • OrderWriteService
  • ProductAddonValueStorage
  • ProductAttribute
  • ProductAttributeCollection
  • ProductAttributeFactory
  • ProductAttributeObjectService
  • ProductAttributeRepository
  • ProductAttributeRepositoryDeleter
  • ProductAttributeRepositoryReader
  • ProductAttributeRepositoryWriter
  • ProductAttributeService
  • ProductAttributeServiceFactory
  • ProductCategoryLinker
  • ProductFactory
  • ProductImage
  • ProductImageCollection
  • ProductImageContainer
  • ProductImageContainerRepository
  • ProductImageFileStorage
  • ProductImagesApiV2Controller
  • ProductListItem
  • ProductListItemCollection
  • ProductListProvider
  • ProductListProviderFactory
  • ProductObjectService
  • ProductPermissionSetter
  • ProductReadService
  • ProductRepository
  • ProductRepositoryDeleter
  • ProductRepositoryReader
  • ProductRepositoryWriter
  • ProductsApiV2Controller
  • ProductServiceFactory
  • ProductSettings
  • ProductSettingsRepository
  • ProductSettingsRepositoryReader
  • ProductSettingsRepositoryWriter
  • ProductsLinksApiV2Controller
  • ProductWriteService
  • RedirectHttpControllerResponse
  • StaticCrossCuttingLoader
  • StaticGXCoreLoader
  • StatisticsService
  • StoredCategory
  • StoredOrderItem
  • StoredOrderItemAttribute
  • StoredOrderItemAttributeCollection
  • StoredOrderItemCollection
  • StoredOrderItemProperty
  • StoredOrderTotal
  • StoredOrderTotalCollection
  • StoredProduct
  • StoredProductAttribute
  • StoredProductAttributeCollection
  • StringCollection
  • StringType
  • UserConfigurationReader
  • UserConfigurationService
  • UserConfigurationWriter
  • VatNumberValidator
  • WritableDirectory
  • WritableFile
  • YetAnotherLanguageProvider
  • ZonesApiV2Controller

Interfaces

  • AddonValueContainerInterface
  • AddonValueServiceInterface
  • AddonValueStorageFactoryInterface
  • AddressBlockInterface
  • AddressBookServiceInterface
  • AddressClassInterface
  • AddressFormatProviderInterface
  • AssetCollectionInterface
  • AssetInterface
  • AttachmentCollectionInterface
  • AttachmentNameInterface
  • AttachmentPathInterface
  • AttachmentsHandlerInterface
  • CategoryFactoryInterface
  • CategoryInterface
  • CategoryListProviderFactoryInterface
  • CategoryListProviderInterface
  • CategoryObjectServiceInterface
  • CategoryReadServiceInterface
  • CategoryRepositoryDeleterInterface
  • CategoryRepositoryInterface
  • CategoryRepositoryReaderInterface
  • CategoryRepositoryWriterInterface
  • CategoryServiceSettingsInterface
  • CategorySettingsInterface
  • CategorySettingsRepositoryInterface
  • CategorySettingsRepositoryReaderInterface
  • CategorySettingsRepositoryWriterInterface
  • CategoryWriteServiceInterface
  • ContactCollectionInterface
  • ContactNameInterface
  • ContactTypeInterface
  • ContentViewInterface
  • CountryServiceInterface
  • CrossCuttingLoaderInterface
  • CrossCuttingObjectInterface
  • CustomerAccountInputValidatorInterface
  • CustomerAddressDeleterInterface
  • CustomerAddressInputValidatorInterface
  • CustomerAddressInterface
  • CustomerAddressReaderInterface
  • CustomerAddressRepositoryInterface
  • CustomerAddressWriterInterface
  • CustomerB2BStatusInterface
  • CustomerCallNumberInterface
  • CustomerCityInterface
  • CustomerCompanyInterface
  • CustomerCountryInterface
  • CustomerCountryIso2Interface
  • CustomerCountryIso3Interface
  • CustomerCountryNameInterface
  • CustomerCountryReaderInterface
  • CustomerCountryRepositoryInterface
  • CustomerCountryZoneInterface
  • CustomerCountryZoneIsoCodeInterface
  • CustomerCountryZoneNameInterface
  • CustomerCountryZoneReaderInterface
  • CustomerCountryZoneRepositoryInterface
  • CustomerDeleterInterface
  • CustomerEmailInterface
  • CustomerFirstnameInterface
  • CustomerGenderInterface
  • CustomerInputValidatorInterface
  • CustomerInputValidatorSettingsInterface
  • CustomerInterface
  • CustomerLastnameInterface
  • CustomerNumberInterface
  • CustomerPasswordInterface
  • CustomerPostcodeInterface
  • CustomerReaderInterface
  • CustomerReadServiceInterface
  • CustomerRegistrationInputValidatorServiceInterface
  • CustomerRepositoryInterface
  • CustomerServiceInterface
  • CustomerServiceSettingsInterface
  • CustomerStatusProviderInterface
  • CustomerStreetInterface
  • CustomerSuburbInterface
  • CustomerVatNumberInterface
  • CustomerWriterInterface
  • CustomerWriteServiceInterface
  • EmailAddressInterface
  • EmailAttachmentInterface
  • EmailCollectionInterface
  • EmailContactInterface
  • EmailContentInterface
  • EmailDeleterInterface
  • EmailFactoryInterface
  • EmailInterface
  • EmailReaderInterface
  • EmailRepositoryInterface
  • EmailServiceInterface
  • EmailSubjectInterface
  • EmailWriterInterface
  • GXCoreLoaderInterface
  • GXCoreLoaderSettingsInterface
  • HttpContextInterface
  • HttpContextReaderInterface
  • HttpControllerResponseInterface
  • HttpDispatcherInterface
  • HttpResponseProcessorInterface
  • HttpServiceFactoryInterface
  • HttpServiceInterface
  • HttpViewControllerFactoryInterface
  • HttpViewControllerInterface
  • HttpViewControllerRegistryInterface
  • IdInterface
  • LanguageProviderInterface
  • MailerAdapterInterface
  • OrderFactoryInterface
  • OrderInterface
  • OrderItemAttributeFactoryInterface
  • OrderItemAttributeInterface
  • OrderItemAttributeRepositoryDeleterInterface
  • OrderItemAttributeRepositoryFactoryInterface
  • OrderItemAttributeRepositoryInterface
  • OrderItemAttributeRepositoryReaderInterface
  • OrderItemAttributeRepositoryWriterInterface
  • OrderItemFactoryInterface
  • OrderItemInterface
  • OrderItemPropertyFactoryInterface
  • OrderItemPropertyRepositoryDeleterInterface
  • OrderItemPropertyRepositoryReaderInterface
  • OrderItemPropertyRepositoryWriterInterface
  • OrderItemRepositoryDeleterInterface
  • OrderItemRepositoryInterface
  • OrderItemRepositoryReaderInterface
  • OrderItemRepositoryWriterInterface
  • OrderListGeneratorInterface
  • OrderObjectServiceInterface
  • OrderPaymentTypeInterface
  • OrderReadServiceInterface
  • OrderRepositoryDeleterInterface
  • OrderRepositoryInterface
  • OrderRepositoryReaderInterface
  • OrderRepositoryWriterInterface
  • OrderServiceSettingsInterface
  • OrderShippingTypeInterface
  • OrderStatusHistoryReaderInterface
  • OrderStatusHistoryWriterInterface
  • OrderTotalFactoryInterface
  • OrderTotalInterface
  • OrderTotalRepositoryDeleterInterface
  • OrderTotalRepositoryInterface
  • OrderTotalRepositoryReaderInterface
  • OrderTotalRepositoryWriterInterface
  • OrderWriteServiceInterface
  • ProductAttributeFactoryInterface
  • ProductAttributeInterface
  • ProductAttributeObjectServiceInterface
  • ProductAttributeRepositoryDeleterInterface
  • ProductAttributeRepositoryInterface
  • ProductAttributeRepositoryReaderInterface
  • ProductAttributeRepositoryWriterInterface
  • ProductAttributeServiceInterface
  • ProductCategoryLinkerInterface
  • ProductFactoryInterface
  • ProductImageContainerInterface
  • ProductImageContainerRepositoryInterface
  • ProductImageInterface
  • ProductImagePathsSettingsInterface
  • ProductImageProcessingInterface
  • ProductInterface
  • ProductListProviderFactoryInterface
  • ProductListProviderInterface
  • ProductObjectServiceInterface
  • ProductPermissionSetterInterface
  • ProductReadServiceInterface
  • ProductRepositoryDeleterInterface
  • ProductRepositoryInterface
  • ProductRepositoryReaderInterface
  • ProductRepositoryWriterInterface
  • ProductSettingsInterface
  • ProductSettingsRepositoryInterface
  • ProductSettingsRepositoryReaderInterface
  • ProductSettingsRepositoryWriterInterface
  • ProductWriteServiceInterface
  • StatisticsServiceInterface
  • StoredCategoryInterface
  • StoredOrderItemAttributeInterface
  • StoredOrderItemInterface
  • StoredOrderTotalInterface
  • StoredProductAttributeInterface
  • StoredProductInterface
  • UserConfigurationReaderInterface
  • UserConfigurationServiceInterface
  • UserConfigurationWriterInterface
  • VatNumberValidatorInterface

Exceptions

  • AjaxException
  • AttachmentNotFoundException
  • FileNotFoundException
  • HttpApiV2Exception
  • MissingControllerNameException
  • UnknownEnvironmentException
  1 <?php
  2 /* --------------------------------------------------------------
  3    GXCoreLoader.inc.php 2016-01-14
  4    Gambio GmbH
  5    http://www.gambio.de
  6    Copyright (c) 2016 Gambio GmbH
  7    Released under the GNU General Public License (Version 2)
  8    [http://www.gnu.org/licenses/gpl-2.0.html]
  9    --------------------------------------------------------------
 10 */
 11 
 12 MainFactory::load_class('GXCoreLoaderInterface');
 13 
 14 /**
 15  * Class GXCoreLoader
 16  *
 17  * @category    System
 18  * @package     Loaders
 19  * @subpackage  GXCoreLoader
 20  */
 21 class GXCoreLoader implements GXCoreLoaderInterface
 22 {
 23     /**
 24      * Contains the loader settings.
 25      *
 26      * @var GXCoreLoaderSettingsInterface
 27      */
 28     protected $gxCoreLoaderSettings;
 29     
 30     /**
 31      * Database Layer Object
 32      *
 33      * @var CI_DB_query_builder
 34      */
 35     protected $ciDatabaseQueryBuilder;
 36     
 37     /**
 38      * Factory for OrderService Objects
 39      *
 40      * @var AbstractOrderServiceFactory
 41      */
 42     protected $orderServiceFactory;
 43     
 44     
 45     /**
 46      * Class Constructor
 47      *
 48      * @param GXCoreLoaderSettingsInterface $gxCoreLoaderSettings
 49      */
 50     public function __construct(GXCoreLoaderSettingsInterface $gxCoreLoaderSettings)
 51     {
 52         $this->gxCoreLoaderSettings = $gxCoreLoaderSettings;
 53     }
 54     
 55     
 56     /**
 57      * Get the requested server object.
 58      *
 59      * @param string $serviceName
 60      *
 61      * @return AddressBookServiceInterface|CountryServiceInterface|CustomerServiceInterface
 62      *
 63      * @throws DomainException
 64      *
 65      * @todo Delegate to GXServiceFactory
 66      */
 67     public function getService($serviceName)
 68     {
 69         switch($serviceName)
 70         {
 71             case 'Customer': // DEPRECATED!!
 72                 $customerServiceFactory = $this->_getCustomerServiceFactory();
 73                 $customerService        = $customerServiceFactory->getCustomerService();
 74                 
 75                 return $customerService;
 76             
 77             case 'CustomerRead':
 78                 $customerServiceFactory = $this->_getCustomerServiceFactory();
 79                 $customerReadService    = $customerServiceFactory->createCustomerReadService();
 80                 
 81                 return $customerReadService;
 82             
 83             case 'CustomerWrite':
 84                 $customerServiceFactory = $this->_getCustomerServiceFactory();
 85                 $customerWriteService   = $customerServiceFactory->createCustomerWriteService();
 86                 
 87                 return $customerWriteService;
 88             
 89             case 'AddressBook':
 90                 $customerServiceFactory = $this->_getCustomerServiceFactory();
 91                 $addressBookService     = $customerServiceFactory->getAddressBookService();
 92                 
 93                 return $addressBookService;
 94             
 95             case 'Country':
 96                 $customerServiceFactory = $this->_getCustomerServiceFactory();
 97                 $countryService         = $customerServiceFactory->getCountryService();
 98                 
 99                 return $countryService;
100             
101             case 'RegistrationInputValidator':
102                 $customerServiceFactory     = $this->_getCustomerServiceFactory();
103                 $registrationInputValidator = $customerServiceFactory->getCustomerRegistrationInputValidatorService();
104                 
105                 return $registrationInputValidator;
106             
107             case 'AccountInputValidator':
108                 $customerServiceFactory = $this->_getCustomerServiceFactory();
109                 $accountInputValidator  = $customerServiceFactory->getCustomerAccountInputValidator();
110                 
111                 return $accountInputValidator;
112             
113             case 'AddressInputValidator':
114                 $customerServiceFactory = $this->_getCustomerServiceFactory();
115                 $accountInputValidator  = $customerServiceFactory->getCustomerAddressInputValidatorService();
116                 
117                 return $accountInputValidator;
118             
119             case 'UserConfiguration':
120                 $db                       = $this->getDatabaseQueryBuilder();
121                 $userConfigurationReader  = MainFactory::create('UserConfigurationReader', $db);
122                 $userConfigurationWriter  = MainFactory::create('UserConfigurationWriter', $db);
123                 $userConfigurationService = MainFactory::create('UserConfigurationService', $userConfigurationReader,
124                                                                 $userConfigurationWriter);
125                 
126                 return $userConfigurationService;
127             
128             case 'Statistics':
129                 $db                = $this->getDatabaseQueryBuilder();
130                 $xtcPrice          = new xtcPrice($_SESSION['currency'],
131                                                   $_SESSION['customers_status']['customers_status_id']);
132                 $statisticsService = MainFactory::create('StatisticsService', $db, $xtcPrice);
133                 
134                 return $statisticsService;
135             
136             case 'Email':
137                 $emailFactory = $this->_getEmailFactory();
138                 
139                 return $emailFactory->createService();
140             
141             case 'OrderObject':
142                 $factory = $this->_getOrderServiceFactory();
143                 
144                 return $factory->createOrderObjectService();
145             
146             case 'OrderRead':
147                 $factory = $this->_getOrderServiceFactory();
148                 
149                 return $factory->createOrderReadService();
150             
151             case 'OrderWrite':
152                 $factory = $this->_getOrderServiceFactory();
153                 
154                 return $factory->createOrderWriteService();
155             
156             case 'Http':
157                 $httpServiceFactory = MainFactory::create('HttpServiceFactory');
158                 
159                 return $httpServiceFactory->createService();
160             
161             case 'CategoryRead':
162                 $factory = $this->_getCategoryServiceFactory();
163                 
164                 return $factory->createCategoryReadService();
165             
166             case 'CategoryWrite':
167                 $factory = $this->_getCategoryServiceFactory();
168                 
169                 return $factory->createCategoryWriteService();
170             
171             case 'CategoryObject':
172                 $factory = $this->_getCategoryServiceFactory();
173                 
174                 return $factory->createCategoryObjectService();
175             
176             case 'AddonValue':
177                 $factory = $this->_getAddonValueServiceFactory();
178                 
179                 return $factory->createAddonValueService();
180             
181             case 'ProductRead':
182                 $factory = $this->_getProductServiceFactory();
183                 
184                 return $factory->createProductReadService();
185             
186             case 'ProductWrite':
187                 $factory = $this->_getProductServiceFactory();
188                 
189                 return $factory->createProductWriteService();
190             
191             case 'ProductObject':
192                 $factory = $this->_getProductServiceFactory();
193                 
194                 return $factory->createProductObjectService();
195             
196             default:
197                 throw new DomainException('Unknown service: ' . htmlentities($serviceName));
198         }
199     }
200     
201     
202     /**
203      * Method depends on CodeIgniter database library
204      *
205      * @return CI_DB_query_builder
206      *
207      * @todo check connection errors
208      * @todo escape special characters in mysqli connection string (AT)
209      * @todo use GXDatabaseAccessorInterface
210      */
211     public function getDatabaseQueryBuilder()
212     {
213         if($this->ciDatabaseQueryBuilder == null)
214         {
215             $dbUser     = $this->gxCoreLoaderSettings->getDatabaseUser();
216             $dbPassword = $this->gxCoreLoaderSettings->getDatabasePassword();
217             $dbServer   = $this->gxCoreLoaderSettings->getDatabaseServer();
218             $dbName     = $this->gxCoreLoaderSettings->getDatabaseName();
219             $dbSocket   = ($this->gxCoreLoaderSettings->getDatabaseSocket()) ? '?socket='
220                                                                                . $this->gxCoreLoaderSettings->getDatabaseSocket() : '';
221             
222             $connectionString = 'mysqli://' . $dbUser . ':' . $dbPassword . '@' . $dbServer . '/' . $dbName . $dbSocket;
223             
224             $this->ciDatabaseQueryBuilder = CIDB($connectionString);
225         }
226         
227         return $this->ciDatabaseQueryBuilder;
228     }
229     
230     
231     /**
232      * Get a customer service factory object.
233      *
234      * @return CustomerServiceFactory
235      */
236     protected function _getCustomerServiceFactory()
237     {
238         $ciDatabaseQueryBuilder = $this->getDatabaseQueryBuilder();
239         $customerServiceFactory = MainFactory::create('CustomerServiceFactory', $ciDatabaseQueryBuilder);
240         
241         return $customerServiceFactory;
242     }
243     
244     
245     /**
246      * Get an email factory object.
247      *
248      * @return EmailFactory
249      */
250     protected function _getEmailFactory()
251     {
252         $db           = $this->getDatabaseQueryBuilder();
253         $emailFactory = MainFactory::create('EmailFactory', $db);
254         
255         return $emailFactory;
256     }
257     
258     
259     /**
260      * Get an order service factory object.
261      *
262      * @return AbstractOrderServiceFactory
263      */
264     protected function _getOrderServiceFactory()
265     {
266         if($this->orderServiceFactory === null)
267         {
268             $db                        = $this->getDatabaseQueryBuilder();
269             $this->orderServiceFactory = MainFactory::create('OrderServiceFactory', $db);
270         }
271         
272         return $this->orderServiceFactory;
273     }
274     
275     
276     /**
277      * Get a category service factory.
278      * 
279      * @return CategoryServiceFactory
280      */
281     protected function _getCategoryServiceFactory()
282     {
283         $db                     = $this->getDatabaseQueryBuilder();
284         $settings               = MainFactory::create('EnvCategoryServiceSettings');
285         $categoryServiceFactory = MainFactory::create('CategoryServiceFactory', $db, $settings);
286         
287         return $categoryServiceFactory;
288     }
289     
290     
291     /**
292      * Get a product service factory
293      *
294      * @return ProductServiceFactory
295      */
296     protected function _getProductServiceFactory()
297     {
298         $db                    = $this->getDatabaseQueryBuilder();
299         $productServiceFactory = MainFactory::create('ProductServiceFactory', $db);
300         
301         return $productServiceFactory;
302     }
303     
304     
305     /**
306      * Get an addon value service factory.
307      * 
308      * @return AddonValueServiceFactory
309      */
310     public function _getAddonValueServiceFactory()
311     {
312         $db = $this->getDatabaseQueryBuilder();
313         $addonValueServiceFactory = MainFactory::create('AddonValueServiceFactory', $db);
314         
315         return $addonValueServiceFactory;
316     }
317 }
318 
API documentation generated by ApiGen