/** * @param ServiceLocatorInterface $serviceLocator * @return HttpControllerMAnager */ protected function getHttpControllerManager(ServiceLocatorInterface $serviceLocator) { if ($this->httpControllerManager === null) { $this->httpControllerManager = FactoryUtils::resolveServiceLocator($serviceLocator)->get('Ajasta\\Core\\Mvc\\Controller\\HttpControllerManager'); } return $this->httpControllerManager; }
/** * @param ServiceLocatorInterface $serviceLocator * @return AdapterInterface */ protected function getConsole(ServiceLocatorInterface $serviceLocator) { if ($this->console === null) { $this->console = FactoryUtils::resolveServiceLocator($serviceLocator)->get('Console'); } return $this->console; }
/** * @return AddressFieldValidator */ public function createService(ServiceLocatorInterface $serviceLocator) { $serviceLocator = FactoryUtils::resolveServiceLocator($serviceLocator); if (!isset($this->options['field'])) { throw new RuntimeException('Missing option "field"'); } return new AddressFieldValidator($serviceLocator->get('Ajasta\\Address\\Service\\AddressService'), $this->options['field']); }
/** * @return InvoiceFieldset */ public function createService(ServiceLocatorInterface $serviceLocator) { $serviceLocator = FactoryUtils::resolveServiceLocator($serviceLocator); $hydratorManager = $serviceLocator->get('HydratorManager'); $fieldset = new InvoiceFieldset(); $fieldset->setHydrator($hydratorManager->get('Ajasta\\Invoice\\Hydrator\\InvoiceHydrator')); return $fieldset; }
/** * @return ClassMethodsHydrator */ public function createService(ServiceLocatorInterface $serviceLocator) { $serviceLocator = FactoryUtils::resolveServiceLocator($serviceLocator); $objectManager = $serviceLocator->get('doctrine.entitymanager.orm_default'); $hydrator = new ClassMethodsHydrator(false); $hydrator->addStrategy('client', new EntityStrategy($objectManager->getRepository('Ajasta\\Client\\Entity\\Client'))); $hydrator->addStrategy('project', new EntityStrategy($objectManager->getRepository('Ajasta\\Client\\Entity\\Project'))); $hydrator->addStrategy('issueDate', new DateStrategy()); $hydrator->addStrategy('dueDate', new DateStrategy()); return $hydrator; }
/** * @return CountrySelect */ public function createService(ServiceLocatorInterface $serviceLocator) { $serviceLocator = FactoryUtils::resolveServiceLocator($serviceLocator); return new CountrySelect($serviceLocator->get('Ajasta\\Address\\Service\\AddressService'), new CountryCodeFormatter($serviceLocator->get('Ajasta\\Locale'))); }
/** * @return UpdateAddressFormatsController */ public function createService(ServiceLocatorInterface $serviceLocator) { $serviceLocator = FactoryUtils::resolveServiceLocator($serviceLocator); return new UpdateAddressFormatsController($serviceLocator->get('Ajasta\\Address\\Service\\MaintenanceService')); }
/** * @return ClientSelect */ public function createService(ServiceLocatorInterface $serviceLocator) { $serviceLocator = FactoryUtils::resolveServiceLocator($serviceLocator); return new ClientSelect($serviceLocator->get('Ajasta\\Client\\Repository\\ClientRepository')); }
/** * @return ClientController */ public function createService(ServiceLocatorInterface $serviceLocator) { $serviceLocator = FactoryUtils::resolveServiceLocator($serviceLocator); $formElementManager = $serviceLocator->get('FormElementManager'); return new ClientController($serviceLocator->get('Ajasta\\Client\\Repository\\ClientRepository'), $serviceLocator->get('Ajasta\\Client\\Service\\ClientService'), $formElementManager->get('Ajasta\\Client\\Form\\ClientForm')); }
/** * @return GetAddressFieldsForCountryController */ public function createService(ServiceLocatorInterface $serviceLocator) { $serviceLocator = FactoryUtils::resolveServiceLocator($serviceLocator); return new GetAddressFieldsForCountryController($serviceLocator->get('Ajasta\\Address\\Service\\AddressService')); }
/** * @return InvoiceOptions */ public function createService(ServiceLocatorInterface $serviceLocator) { $serviceLocator = FactoryUtils::resolveServiceLocator($serviceLocator); return new InvoiceOptions($serviceLocator->get('Ajasta\\Invoice\\Options')); }
/** * @return DisplayCurrency */ public function createService(ServiceLocatorInterface $serviceLocator) { $serviceLocator = FactoryUtils::resolveServiceLocator($serviceLocator); return new DisplayCurrency(new CurrencyCodeFormatter($serviceLocator->get('Ajasta\\Locale'))); }
/** * @return AddressFormat */ public function createService(ServiceLocatorInterface $serviceLocator) { $serviceLocator = FactoryUtils::resolveServiceLocator($serviceLocator); return new AddressFormat($serviceLocator->get('Ajasta\\Address\\Service\\AddressService')); }
/** * @return InvoiceController */ public function createService(ServiceLocatorInterface $serviceLocator) { $serviceLocator = FactoryUtils::resolveServiceLocator($serviceLocator); $formElementManager = $serviceLocator->get('FormElementManager'); return new InvoiceController($serviceLocator->get('Ajasta\\Invoice\\Repository\\InvoiceRepository'), $serviceLocator->get('Ajasta\\Invoice\\Service\\InvoiceService'), $formElementManager->get('Ajasta\\Invoice\\Form\\InvoiceForm'), $serviceLocator->get('Ajasta\\Invoice\\Datatable\\Formatter')); }
/** * @return AddressFieldset */ public function createService(ServiceLocatorInterface $serviceLocator) { $serviceLocator = FactoryUtils::resolveServiceLocator($serviceLocator); $hydratorManager = $serviceLocator->get('HydratorManager'); return new AddressFieldset($hydratorManager->get('Ajasta\\Address\\Hydrator\\AddressHydrator')); }
/** * @return CurrencySelect */ public function createService(ServiceLocatorInterface $serviceLocator) { $serviceLocator = FactoryUtils::resolveServiceLocator($serviceLocator); $options = $serviceLocator->get('Ajasta\\Core\\Options'); return new LocaleSelect($options->getSelectableLocales(), $options->getDefaultLocale()); }