### php.java.faces

# Class PhpFacesContext

- `java.lang.Object`

- `javax.faces.context.FacesContext`

- `php.java.faces.PhpFacesContext`

`public class PhpFacesContext`
`extends javax.faces.context.FacesContext`

A custom FacesContext. Stores the baseURL, creates script engines.

Author:
  jostb

## Constructor Summary

`PhpFacesContext(javax.faces.context.FacesContext facesContext, java.lang.Object kontext, java.lang.Object request, java.lang.Object response)`

## Method Summary

`void`

`addMessage(java.lang.String clientId, javax.faces.application.FacesMessage message)`

`javax.faces.application.Application`

`getApplication()`

`java.lang.String`

`getBaseURL()`

`java.lang.String`

`getBaseURL(java.lang.String port)`

`java.util.Iterator`

`getClientIdsWithMessages()`

`javax.faces.context.ExternalContext`

`getExternalContext()`

`FacesMessage.Severity`

`getMaximumSeverity()`

`java.util.Iterator`

`getMessages()`

`java.util.Iterator`

`getMessages(java.lang.String clientId)`

`javax.faces.render.RenderKit`

`getRenderKit()`

`boolean`

`getRenderResponse()`

`boolean`

`getResponseComplete()`

`javax.faces.context.ResponseStream`

`getResponseStream()`

`javax.faces.context.ResponseWriter`

`getResponseWriter()`

`ScriptEngine`

`getScriptEngine(java.lang.Object key, java.net.URL url)`
  Get a script engine

`javax.faces.component.UIViewRoot`

`getViewRoot()`

`void`

`release()`

`void`

`renderResponse()`

`void`

`responseComplete()`

`void`

`setResponseStream(javax.faces.context.ResponseStream responseStream)`

`void`

`setResponseWriter(javax.faces.context.ResponseWriter responseWriter)`

`void`

`setViewRoot(javax.faces.component.UIViewRoot root)`

### Methods inherited from class javax.faces.context.FacesContext

`addMessage`, `getApplication`, `getClientIdsWithMessages`, `getCurrentInstance`, `getELContext`, `getExternalContext`, `getMaximumSeverity`, `getMessages`, `getMessages`, `getRenderKit`, `getRenderResponse`, `getResponseComplete`, `getResponseStream`, `getResponseWriter`, `getViewRoot`, `release`, `renderResponse`, `responseComplete`, `setResponseStream`, `setResponseWriter`, `setViewRoot`

### Methods inherited from class java.lang.Object

`equals`, `getClass`, `hashCode`, `notify`, `notifyAll`, `toString`, `wait`, `wait`, `wait`

## Constructor Details

### PhpFacesContext

    public PhpFacesContext(javax.faces.context.FacesContext facesContext,
                           java.lang.Object kontext,
                           java.lang.Object request,
                           java.lang.Object response)

> Parameters:
>   `facesContext` -

## Method Details

### addMessage

    public void addMessage(java.lang.String clientId,
                           javax.faces.application.FacesMessage message)

> Overrides:
>   addMessage in interface javax.faces.context.FacesContext

### getApplication

    public javax.faces.application.Application getApplication()

> Overrides:
>   getApplication in interface javax.faces.context.FacesContext

### getBaseURL

    public java.lang.String getBaseURL()

> Returns:
>   The base URL, e.g. http://127.0.0.1:8080/JavaBridge

### getBaseURL

    public java.lang.String getBaseURL(java.lang.String port)

> Returns:
>   The base URL, e.g. http://127.0.0.1:8080/JavaBridge

### getClientIdsWithMessages

    public java.util.Iterator getClientIdsWithMessages()

> Overrides:
>   getClientIdsWithMessages in interface javax.faces.context.FacesContext

### getExternalContext

    public javax.faces.context.ExternalContext getExternalContext()

> Overrides:
>   getExternalContext in interface javax.faces.context.FacesContext

### getMaximumSeverity

    public FacesMessage.Severity getMaximumSeverity()

> Overrides:
>   getMaximumSeverity in interface javax.faces.context.FacesContext

### getMessages

    public java.util.Iterator getMessages()

> Overrides:
>   getMessages in interface javax.faces.context.FacesContext

### getMessages

    public java.util.Iterator getMessages(java.lang.String clientId)

> Overrides:
>   getMessages in interface javax.faces.context.FacesContext

### getRenderKit

    public javax.faces.render.RenderKit getRenderKit()

> Overrides:
>   getRenderKit in interface javax.faces.context.FacesContext

### getRenderResponse

    public boolean getRenderResponse()

> Overrides:
>   getRenderResponse in interface javax.faces.context.FacesContext

### getResponseComplete

    public boolean getResponseComplete()

> Overrides:
>   getResponseComplete in interface javax.faces.context.FacesContext

### getResponseStream

    public javax.faces.context.ResponseStream getResponseStream()

> Overrides:
>   getResponseStream in interface javax.faces.context.FacesContext

### getResponseWriter

    public javax.faces.context.ResponseWriter getResponseWriter()

> Overrides:
>   getResponseWriter in interface javax.faces.context.FacesContext

### getScriptEngine

    public ScriptEngine getScriptEngine(java.lang.Object key,
                                        java.net.URL url)
                throws java.net.UnknownHostException,
                       ScriptException,
                       java.io.IOException

> Get a script engine

> Parameters:
>   `key` - The Script proxy
>   `url` - The URL, for example getBaseURL() + "/foo.php";

> Returns:
>   The script engine.

> Throws:
>   `ScriptException` -
>   `java.io.IOException` -
>   `java.net.UnknownHostException` -

> See Also:
>   `getBaseURL()`

### getViewRoot

    public javax.faces.component.UIViewRoot getViewRoot()

> Overrides:
>   getViewRoot in interface javax.faces.context.FacesContext

### release

    public void release()

> Overrides:
>   release in interface javax.faces.context.FacesContext

### renderResponse

    public void renderResponse()

> Overrides:
>   renderResponse in interface javax.faces.context.FacesContext

### responseComplete

    public void responseComplete()

> Overrides:
>   responseComplete in interface javax.faces.context.FacesContext

### setResponseStream

    public void setResponseStream(javax.faces.context.ResponseStream responseStream)

> Overrides:
>   setResponseStream in interface javax.faces.context.FacesContext

### setResponseWriter

    public void setResponseWriter(javax.faces.context.ResponseWriter responseWriter)

> Overrides:
>   setResponseWriter in interface javax.faces.context.FacesContext

### setViewRoot

    public void setViewRoot(javax.faces.component.UIViewRoot root)

> Overrides:
>   setViewRoot in interface javax.faces.context.FacesContext