public static void log(Handler h, String msg) { h.log("php: " + msg); }
public static void StartUp() { inited = startup(); } }
/** * Setup any PHP internal data structures. This MUST be the * first function called for PHP module. * @param libraryName the name of the library to load */ public static boolean initialize(String libraryName) throws Exception { if (engine == null) { if (libraryName == null) engine = new Library(); else engine = new Library(libraryName); PHP_MAJOR_VERSION = version(1); PHP_MINOR_VERSION = version(2); PHP_PATCH_VERSION = version(3); } phpthread = new PhpThread(); phpthread.setDaemon(true); phpthread.start(); // Wait until the startup is done. while (!inited && phpthread.isAlive()) { Thread.currentThread().sleep(3000); } return inited; }
/** * Converts Environment Hastable to String array * * @return Srring array containing name value pairs. * @exception NullPointerException if a hash key has a null value */ public String[] getEnvironmentArray() throws NullPointerException { return hashToStringArray(env); }
/** * Converts null strings to blank strings ("") * * @param s string to be converted if necessary * @return a non-null string, either the original or the empty string * ("") if the original was <code>null</code> */ protected String nullsToBlanks(String s) { return nullsToString(s, ""); }
public static String[] env(ScriptEnvironment e) { return e.getEnvironmentArray(); }
/** * Provides PHP Highlight Gateway service * * @param req HttpServletRequest passed in by servlet container * @param res HttpServletResponse passed in by servlet container * * @exception ServletException if a servlet-specific exception occurs * @exception IOException if a read/write exception occurs * * @see org.apache.catalina.servlets.php.Handler * */ protected void service(HttpServletRequest req, HttpServletResponse res) throws ServletException, IOException { syntaxHighlight = true; super.service(req, res); } }
public static String cookies(ScriptEnvironment e) { return (String)e.getEnvironment().get("HTTP_COOKIE"); }
/** * Setup any PHP internal data structures. This MUST be the * first function called for PHP module. * @param libraryName the name of the library to load */ public static boolean initialize(String libraryName) throws Exception { if (engine == null) { if (libraryName == null) engine = new Library(); else engine = new Library(libraryName); PHP_MAJOR_VERSION = version(1); PHP_MINOR_VERSION = version(2); PHP_PATCH_VERSION = version(3); } phpthread = new PhpThread(); phpthread.setDaemon(true); phpthread.start(); // Wait until the startup is done. while (!inited && phpthread.isAlive()) { Thread.currentThread().sleep(3000); } return inited; }
public static void log(Handler h, String msg) { h.log("php: " + msg); }
public static void StartUp() { inited = startup(); } }
/** * Converts Environment Hastable to String array * * @return Srring array containing name value pairs. * @exception NullPointerException if a hash key has a null value */ public String[] getEnvironmentArray() throws NullPointerException { return hashToStringArray(env); }
/** * Converts null strings to blank strings ("") * * @param s string to be converted if necessary * @return a non-null string, either the original or the empty string * ("") if the original was <code>null</code> */ protected String nullsToBlanks(String s) { return nullsToString(s, ""); }
public static String[] env(ScriptEnvironment e) { return e.getEnvironmentArray(); }
/** * Provides PHP Highlight Gateway service * * @param req HttpServletRequest passed in by servlet container * @param res HttpServletResponse passed in by servlet container * * @exception ServletException if a servlet-specific exception occurs * @exception IOException if a read/write exception occurs * * @see org.apache.catalina.servlets.php.Handler * */ protected void service(HttpServletRequest req, HttpServletResponse res) throws ServletException, IOException { syntaxHighlight = true; super.service(req, res); } }
public static String cookies(ScriptEnvironment e) { return (String)e.getEnvironment().get("HTTP_COOKIE"); }