2014-05-22 20:38:27 +02:00
|
|
|
{%- macro php_block(config) %}
|
|
|
|
{% for sections in config %}
|
|
|
|
{%- for section, settings in sections.items() -%}
|
|
|
|
{%- if settings is number or settings is string %}
|
2014-05-20 21:59:25 +02:00
|
|
|
{{ section }} = {{ settings }}
|
2014-05-22 20:38:27 +02:00
|
|
|
{%- else %}
|
2014-05-20 21:59:25 +02:00
|
|
|
[{{ section }}]
|
2018-05-07 09:06:42 +02:00
|
|
|
{%- for setting in settings -%}
|
2014-05-22 20:38:27 +02:00
|
|
|
{%- for key, value in setting.items() %}
|
|
|
|
{%- if value is number or value is string %}
|
|
|
|
{{ key }} = {{ value }}
|
|
|
|
{%- elif value is iterable -%}
|
|
|
|
{%- if key == 'error_reporting' %}
|
|
|
|
{{ key }} = {{ value|join(" & ") }}
|
2015-06-20 20:35:21 +02:00
|
|
|
{%- elif key == 'extension' %}
|
|
|
|
{{ key }} = {{ value|join("\n extension = ") }}
|
2014-05-22 20:38:27 +02:00
|
|
|
{%- else %}
|
|
|
|
{{ key }} = {{ value|join(",") }}
|
|
|
|
{%- endif -%}
|
|
|
|
{%- endif -%}
|
|
|
|
{%- endfor -%}
|
|
|
|
{%- endfor -%}
|
|
|
|
{%- endif -%}
|
2014-05-20 21:59:25 +02:00
|
|
|
{%- endfor -%}
|
2014-05-22 20:38:27 +02:00
|
|
|
{% endfor %}
|
2014-05-20 21:59:25 +02:00
|
|
|
{%- endmacro -%}
|
|
|
|
|
|
|
|
; PHP configuration file.
|
|
|
|
;
|
|
|
|
; **** DO NOT EDIT THIS FILE ****
|
|
|
|
;
|
2014-06-06 19:14:44 +02:00
|
|
|
; This file is managed by Salt via {{ source }}
|
2014-05-22 20:38:27 +02:00
|
|
|
{{ php_block(config) }}
|