php.java.bridge
Class Util.ProcessWithErrorHandler
java.lang.Object
java.lang.Process
php.java.bridge.Util.Process
php.java.bridge.Util.ProcessWithErrorHandler
- Enclosing class:
- Util
public static class Util.ProcessWithErrorHandler
- extends Util.Process
Starts a CGI process with an error handler attached and returns the process handle.
Method Summary |
void |
checkError()
Check for a PHP fatal error and throw a PHP exception if necessary. |
static Util.Process |
start(java.lang.String[] args,
boolean includeJava,
java.lang.String cgiDir,
java.lang.String pearDir,
java.lang.String webInfDir,
java.io.File homeDir,
java.util.Map env,
boolean tryOtherLocations,
boolean preferSystemPhp,
java.io.OutputStream err)
Starts a CGI process and returns the process handle. |
int |
waitFor()
|
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
checkError
public void checkError()
throws Util.Process.PhpException
- Check for a PHP fatal error and throw a PHP exception if necessary.
- Overrides:
checkError
in class Util.Process
- Throws:
Util.Process.PhpException
waitFor
public int waitFor()
throws java.lang.InterruptedException
-
- Overrides:
waitFor
in class Util.Process
- Throws:
java.lang.InterruptedException
start
public static Util.Process start(java.lang.String[] args,
boolean includeJava,
java.lang.String cgiDir,
java.lang.String pearDir,
java.lang.String webInfDir,
java.io.File homeDir,
java.util.Map env,
boolean tryOtherLocations,
boolean preferSystemPhp,
java.io.OutputStream err)
throws java.io.IOException
- Starts a CGI process and returns the process handle.
- Parameters:
args
- The args array, e.g.: new String[]{null, "-b", ...};. If args is null or if args[0] is null, the function looks for the system property "php.java.bridge.php_exec".homeDir
- The home directory. If null, the current working directory is used.env
- The CGI environment. If null, Util.DEFAULT_CGI_ENVIRONMENT is used.tryOtherLocations
- true if the should check DEFAULT_CGI_LOCATIONSpreferSystemPhp
- true if the should check DEFAULT_CGI_LOCATIONS firsterr
- The error stream
- Returns:
- The process handle.
- Throws:
java.io.IOException
- See Also:
Util.checkCgiBinary(String)