Skip to content

Commit 6ed5368

Browse files
committed
Added doc blox and assert_private.
refs jippi#148
1 parent 3bb01f4 commit 6ed5368

3 files changed

Lines changed: 84 additions & 0 deletions

File tree

manifests/extension.pp

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,15 @@
2323
# [*source*]
2424
# The path to the deb package to install
2525
#
26+
# [*sapis*]
27+
# An array of PHP SAPIs for which extension should be installed. This
28+
# parameters applies to PECL extensions only.
29+
# @see http://php.net/manual/en/function.php-sapi-name.php
30+
#
31+
# [*priority*]
32+
# Module loading priority. Default is 20. .
33+
# @see http://www.brandonchecketts.com/archives/getting-ubuntu-14-04-php5enmod-to-understand-module-priority
34+
#
2635
# === Variables
2736
#
2837
# [*php_ensure*]
@@ -49,6 +58,14 @@
4958
# source => "/path/to/libgearman8_1.1.7-1_amd64.deb";
5059
# }
5160
#
61+
# php::extension { 'gearman':
62+
# ensure => "latest",
63+
# package => "gearman",
64+
# provider => "pecl",
65+
# sapis => ['cli', 'fpm'],
66+
# priority_=> 30
67+
# }
68+
#
5269
# === Authors
5370
#
5471
# Christian "Jippi" Winther <jippignu@gmail.com>

manifests/extension/disenable.pp

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,43 @@
1+
# == Type: php::extension::disenable
2+
#
3+
# Enables a PHP extension installed using PECL
4+
#
5+
# === Parameters
6+
#
7+
# [*extension*]
8+
# The name of extension to enable or disenable
9+
#
10+
# [*ensure*]
11+
# The ensure of the package to install
12+
# Could be "latest", "installed", pinned version or "absent"
13+
#
14+
# [*priority*]
15+
# Integer indicateing loading order
16+
#
17+
# === Variables
18+
#
19+
# No variables
20+
#
21+
# === Examples
22+
#
23+
# This is a private type and should not be used on its own.
24+
#
25+
# === Author
26+
#
27+
# Goran Miskovic <schkovich@gmail.com>
28+
#
29+
# === Copyright
30+
#
31+
# Copyright 2012-2016 Christian "Jippi" Winther, unless otherwise noted.
32+
#
133
define php::extension::disenable (
234
$extension,
335
$ensure = 'present',
436
$priority = 20,
537
) {
638

39+
assert_private("This is a privete type and should not be used on its own.")
40+
741
$sapi = delete($title, $extension)
842

943
Exec {

manifests/sapi.pp

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,41 @@
1+
# == Type: php::sapi
2+
#
3+
# Enables a PHP extension installed using PECL
4+
#
5+
# === Parameters
6+
#
7+
# [*extension*]
8+
# The name of extension to enable or disenable
9+
#
10+
# [*ensure*]
11+
# The ensure of the package to install
12+
# Could be "latest", "installed", pinned version or "absent"
13+
#
14+
# [*priority*]
15+
# Integer indicateing loading order
16+
#
17+
# === Variables
18+
#
19+
# No variables
20+
#
21+
# === Examples
22+
#
23+
# This is a private type and should not be used on its own.
24+
#
25+
# === Author
26+
#
27+
# Goran Miskovic <schkovich@gmail.com>
28+
#
29+
# === Copyright
30+
#
31+
# Copyright 2012-2016 Christian "Jippi" Winther, unless otherwise noted.
32+
#
133
define php::sapi (
234
$extension,
335
$ensure,
436
$priority,
537
) {
38+
assert_private("This is a privete type and should not be used on its own.")
639
include php::apache::params
740
include php::fpm::params
841
case $title {

0 commit comments

Comments
 (0)