CInbox (Common-Inbox)  0.1
Common functionality for ingesting files for archiving.
 All Classes Functions Variables
Public Member Functions | Public Attributes | Protected Attributes | List of all members
CIExec Class Reference

Public Member Functions

 getExitCode ()
 
 getLastOutput ()
 
 getLastCommand ()
 
 executeBlindly ($command)
 
 execute2 ($command)
 
 execute ($command)
 

Public Attributes

const EC_OK = 0
 

Protected Attributes

 $exitCode = null
 
 $lastCmd = null
 
 $lastOutput = null
 

Detailed Description

Provides a simple handler for executing external commands. Supports returning the exit code and text output of the externally called command.

Author
Peter Bubestinger-Steindl (pb@av.nosp@m.-rd..nosp@m.com)
See also

Member Function Documentation

CIExec::execute (   $command)

Wrapper to default-execution method.

CIExec::execute2 (   $command)

This uses "exec()" to call $command.

CIExec::executeBlindly (   $command)

This is a quick-n-dirty solution for calling an external command, but without wanting to handle its output/feedback/etc.

It returns the exit code of the $command: Usually 0 is good - and non-zero means error.

CIExec::getExitCode ( )

Returns the exit code of the last command executed.

CIExec::getLastCommand ( )

Returns the commandline string that was last executed.

CIExec::getLastOutput ( )

Return the output of the last command (as array).


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