config = include __DIR__ . '/../../../config/field.config.php'; $this->themeStack = array(); } /** * @see \Zend\ServiceManager\ServiceLocatorAwareInterface::setServiceLocator() */ public function setServiceLocator(ServiceLocatorInterface $serviceLocator) { $this->services = $serviceLocator; } /** * @see \Zend\ServiceManager\ServiceLocatorAwareInterface::getServiceLocator() */ public function getServiceLocator() { return $this->services; } /** * Retrieve service config. * @return \Zend\Config\Config */ public function getConfig() { return $this->config; } public function collect(array $inputs) { $inputStack = array(); foreach ($inputs as $group => $fieldSet) { $inputStack[$group] = array(); foreach ($fieldSet as $field => $type) { $inputStack[$group][$field] = isset($this->config[$type]) ? $this->config[$type] : $this->config['Default']; } } return $inputStack; } }