php.pp

# File:  modules/php/manifests/install/php.pp
# Class: php::install::php
#
class php::install::php {

    # Always include the configuration parameters.
    include php::params

    # Install the main php.
    package { 'php':
        schedule => daily,
        ensure => $php::params::version,
        provider => yum
    }

    # If the built-in $require is set, add it to the package.
    if $require {
        Package['php'] {
            require +> [ Class['php::install::packages'], $require ]
        }
    } else {
        Package['php'] {
            require +> Class['php::install::packages']
        }
    }

    # Install all the built-in php extensions.
    package { $php::params::extensions:
        schedule => daily,
        ensure => $php::params::version,
        provider => yum,
        require => Package['php']
    }

    # Set up the main php.ini
    file { '/etc/php.ini':
       owner => root,
       group => root,
       mode => 644,
       content => template('php/php.ini.erb'),
       require => Package['php']
    }
}