# Puppet Class: php::embedded

Inherits:
  ::php::params

Defined in:
  manifests/embedded.pp

## Overview

Install and configure php embedded SAPI

=== Parameters

[inifile] The path to the ini php5-embeded ini file

[settings] Hash with nested hash of key => value to set in inifile

[package] Specify which package to install

[ensure] Specify which version of the package to install

Parameters:

- ensure (`String`) (defaults to: `$::php::ensure`)
- package (`String`) (defaults to: `"${::php::package_prefix}${::php::params::embedded_package_suffix}"`)
- inifile (`Stdlib::Absolutepath`) (defaults to: `$::php::params::embedded_inifile`)
- settings (`Hash`) (defaults to: `{}`)

    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
    46
    47
    # File 'manifests/embedded.pp', line 17

    class php::embedded(
      String $ensure                = $::php::ensure,
      String $package               = "${::php::package_prefix}${::php::params::embedded_package_suffix}",
      Stdlib::Absolutepath $inifile = $::php::params::embedded_inifile,
      Hash $settings                = {},
    ) inherits ::php::params {

      if $caller_module_name != $module_name {
        warning('php::embedded is private')
      }

      $real_settings = deep_merge(
        $settings,
        hiera_hash('php::embedded::settings', {})
      )

      $real_package = $facts['os']['family'] ? {
        'Debian' => "lib${package}",
        default   => $package,
      }

      package { $real_package:
        ensure  => $ensure,
        require => Class['::php::packages'],
      }
      -> ::php::config { 'embedded':
        file   => $inifile,
        config => $real_settings,
      }

    }