|
111 | 111 | # The package ensure of PHP pear to install and run pear auto_discover |
112 | 112 | # |
113 | 113 | # [*settings*] |
| 114 | +# PHP configuration parameters in php.ini files as a hash. For example, |
| 115 | +# 'Date/date.timezone' => 'Australia/Melbourne' sets data.timezone |
| 116 | +# to 'Australia/Melbourne' under [Date] section, and |
| 117 | +# 'PHP/memory_limit' => '256M' sets memory_limit to 256M. |
| 118 | +# |
| 119 | +# [*cli_settings*] |
| 120 | +# Additional hash of PHP configuration parameters for PHP CLI. When a |
| 121 | +# setting key already exists in $settings, the value provided from the |
| 122 | +# $cli_settings parameter overrides the value from $settings parameter. |
| 123 | +# For example, 'PHP/memory_limit' => '1000M' sets memory_limit to 1000M |
| 124 | +# for the PHP cli ini file, regardless of the values from $settings. |
114 | 125 | # |
115 | 126 | class php ( |
116 | 127 | String $ensure = $php::params::ensure, |
|
137 | 148 | $proxy_server = undef, |
138 | 149 | Hash $extensions = {}, |
139 | 150 | Hash $settings = {}, |
| 151 | + Hash $cli_settings = {}, |
140 | 152 | $package_prefix = $php::params::package_prefix, |
141 | 153 | Stdlib::Absolutepath $config_root_ini = $php::params::config_root_ini, |
142 | 154 | Stdlib::Absolutepath $config_root_inifile = $php::params::config_root_inifile, |
|
154 | 166 | $real_fpm_pools = $fpm_pools |
155 | 167 | $real_fpm_global_pool_settings = $fpm_global_pool_settings |
156 | 168 |
|
| 169 | + # Merge in additional or overridden settings for php::cli::settings. |
| 170 | + $final_cli_settings = $real_settings + $cli_settings |
| 171 | + |
157 | 172 | if $manage_repos { |
158 | 173 | class { 'php::repo': } |
159 | 174 | -> Anchor['php::begin'] |
|
162 | 177 | anchor { 'php::begin': } |
163 | 178 | -> class { 'php::packages': } |
164 | 179 | -> class { 'php::cli': |
165 | | - settings => $real_settings, |
| 180 | + settings => $final_cli_settings, |
166 | 181 | } |
167 | 182 | -> anchor { 'php::end': } |
168 | 183 |
|
|
0 commit comments