summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/php.eselect.in28
1 files changed, 28 insertions, 0 deletions
diff --git a/src/php.eselect.in b/src/php.eselect.in
index 5bbb491..e08afbe 100644
--- a/src/php.eselect.in
+++ b/src/php.eselect.in
@@ -82,6 +82,22 @@ find_targets() {
echo $dirs
}
+# List all valid apache2 targets. The list is obtained by searching
+# for libphp*.so in locations determined by find_targets(). This list
+# should therefore be a subset of find_targets().
+#
+# INPUT:
+#
+# None.
+#
+# OUTPUT:
+#
+# The "display name" of every available apache PHP module, one per line.
+# For example,
+#
+# php5.6
+# php7.0
+#
find_targets_apache2() {
local libs target libdir
for target in $(find_targets); do
@@ -143,6 +159,18 @@ get_active_fpm() {
}
+# Find the active (selected) version of the apache2 module. Used to
+# decorate the output of the `eselect php list apache2` command.
+#
+# INPUT:
+#
+# None.
+#
+# OUTPUT:
+#
+# The "display name" of the active apache2 module. For example,
+# "php5.6" or "php7.0".
+#
get_active_apache2() {
local libs target ver
libs="${EROOT}$(get_active_libdir)/apache2/modules/libphp[57].so"