/** * * @param Config $config The config containing the values to use * * @return string Returns the string for the options array */ private function generateServiceOptions(Config $config) { $ret = ''; if (count($config->getOptionFeatures()) > 0) { $i = 0; $ret .= "\n if (isset(\$options['features']) == false)\n {\n \$options['features'] = "; foreach ($config->getOptionFeatures() as $option) { if ($i++ > 0) { $ret .= ' | '; } $ret .= $option; } $ret .= ";\n }" . PHP_EOL; } if (strlen($config->getWsdlCache()) > 0) { $ret .= "\n if (isset(\$options['wsdl_cache']) == false)\n {\n \$options['wsdl_cache'] = " . $config->getWsdlCache(); $ret .= ";\n }" . PHP_EOL; } if (strlen($config->getCompression()) > 0) { $ret .= "\n if (isset(\$options['compression']) == false)\n {\n \$options['compression'] = " . $config->getCompression(); $ret .= ";\n }" . PHP_EOL; } return $ret; }