openmediavault  4.0 (Arrakis)
The open network attached storage solution
Public Member Functions | Protected Member Functions | List of all members
OMV\Engine\Module\ModuleAbstract Class Reference
Inheritance diagram for OMV\Engine\Module\ModuleAbstract:
OMV\Engine\Module\ServiceAbstract

Public Member Functions

 getName ()
 
 setDirty ()
 
 setDirtyByName ($name)
 
 isDirty ()
 

Protected Member Functions

 exec ($command, &$output=NULL)
 
 getAdminContext ()
 
 addTask ($id, $name, $params)
 
 execTasks ($id)
 

Detailed Description

The core module class.

Member Function Documentation

◆ addTask()

OMV\Engine\Module\ModuleAbstract::addTask (   $id,
  $name,
  $params 
)
finalprotected

Add a task that can be performed at a later date.

Parameters
idThe identifier of the task type.
nameThe name of the class method to be executed.
paramsThe parameters passed to the method when it is executed.
Returns
None.

◆ exec()

OMV\Engine\Module\ModuleAbstract::exec (   $command,
$output = NULL 
)
finalprotected

Helper function to execute an external program.

Parameters
commandThe command that will be executed.
outputIf the output argument is present, then the specified array will be filled with every line of output from the command. Trailing whitespace, such as
, is not included in this array.
Returns
The exit code of the command.

◆ execTasks()

OMV\Engine\Module\ModuleAbstract::execTasks (   $id)
finalprotected

Execute the tasks with the given identifier.

Parameters
idThe identifier of the tasks to be executed.
Returns
None.

◆ getAdminContext()

OMV\Engine\Module\ModuleAbstract::getAdminContext ( )
finalprotected

Helper function to get the administrator context.

Returns
The administrator context object.

◆ getName()

OMV\Engine\Module\ModuleAbstract::getName ( )
abstract

Get the name of the module.

Returns
The name of the module.

◆ isDirty()

OMV\Engine\Module\ModuleAbstract::isDirty ( )
final

Helper function to check whether the module is marked dirty.

Returns
TRUE if the module is marked dirty, otherwise FALSE.

◆ setDirty()

OMV\Engine\Module\ModuleAbstract::setDirty ( )
final

Helper function to mark this module as dirty.

Returns
The list of dirty modules.

◆ setDirtyByName()

OMV\Engine\Module\ModuleAbstract::setDirtyByName (   $name)
final

Helper function to mark the given module as dirty.

Parameters
nameThe name of the module.
Returns
The list of dirty modules.

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