2024.8.23
Loading...
Searching...
No Matches
ActionEnable Class Reference

Public Member Functions

 __construct ($args)
 

Detailed Description

Class ActionEnable

This class is responsible for enabling various services (Apache, PHP, MySQL, etc.) based on the provided arguments.

Definition at line 15 of file class.action.enable.php.

Constructor & Destructor Documentation

◆ __construct()

ActionEnable::__construct ( $args)

Constructor for the ActionEnable class.

Parameters
array$argsAn array of arguments where the first element is the service name and the second element is the enable flag.

@global object $bearsamppBins Global object containing instances of various services.

Definition at line 24 of file class.action.enable.php.

25 {
26 global $bearsamppBins;
27
28 if ( isset( $args[0] ) && !empty( $args[0] ) && isset( $args[1] ) ) {
30 if ( $args[0] == $bearsamppBins->getApache()->getName() ) {
31 $bearsamppBins->getApache()->setEnable( $args[1], true );
32 }
33 elseif ( $args[0] == $bearsamppBins->getPhp()->getName() ) {
34 $bearsamppBins->getPhp()->setEnable( $args[1], true );
35 }
36 elseif ( $args[0] == $bearsamppBins->getMysql()->getName() ) {
37 $bearsamppBins->getMysql()->setEnable( $args[1], true );
38 }
39 elseif ( $args[0] == $bearsamppBins->getMariadb()->getName() ) {
40 $bearsamppBins->getMariadb()->setEnable( $args[1], true );
41 }
42 elseif ( $args[0] == $bearsamppBins->getNodejs()->getName() ) {
43 $bearsamppBins->getNodejs()->setEnable( $args[1], true );
44 }
45 elseif ( $args[0] == $bearsamppBins->getPostgresql()->getName() ) {
46 $bearsamppBins->getPostgresql()->setEnable( $args[1], true );
47 }
48 elseif ( $args[0] == $bearsamppBins->getFilezilla()->getName() ) {
49 $bearsamppBins->getFilezilla()->setEnable( $args[1], true );
50 }
51 elseif ( $args[0] == $bearsamppBins->getMailhog()->getName() ) {
52 $bearsamppBins->getMailhog()->setEnable( $args[1], true );
53 }
54 elseif ( $args[0] == $bearsamppBins->getMailpit()->getName() ) {
55 $bearsamppBins->getMailpit()->setEnable( $args[1], true );
56 }
57 elseif ( $args[0] == $bearsamppBins->getMemcached()->getName() ) {
58 $bearsamppBins->getMemcached()->setEnable( $args[1], true );
59 }
60 elseif ( $args[0] == $bearsamppBins->getXlight()->getName() ) {
61 $bearsamppBins->getXlight()->setEnable( $args[1], true );
62 }
63 }
64 }
global $bearsamppBins
static startLoading()

References $bearsamppBins, and Util\startLoading().


The documentation for this class was generated from the following file: