## php.java.faces
Class Script

    java.lang.Object
      php.java.faces.Script

    public class Script

extends java.lang.Object

Proxy for calling php scripts.

Author:
  jostb

Constructor Summary
`Script()` Creates a new script proxy.

Method Summary
`java.lang.Object` `call(java.lang.String name, java.lang.Class[] classes, java.lang.Object[] args)` Call a php method.
`java.lang.Object` `getValue(int index)` Cal the php method "getValueIndex".
`java.lang.Object` `getValue(java.lang.Object property)` Call the php method "getValue".
`void` `setScript(java.lang.Object value)` Called for the managed Property "script".
`void` `setValue(int index, java.lang.Object value)` Call the php method "setValueIndex".
`void` `setValue(java.lang.Object property, java.lang.Object value)` Call the php method "setValue".

Methods inherited from class java.lang.Object
`equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### Script

    public Script()

  Creates a new script proxy. Scripts may be defined in `faces-config.xml` as "/scriptname.php" for local scripts or "http://.../scriptname.php" for remote scripts. Remote scripts are executed and invoked on the remote server. Example from `faces-config.xml`:
  `<managed-bean>
  <managed-bean-name>helloWorldBacking</managed-bean-name>
  <managed-bean-class>php.java.faces.Script</managed-bean-class>
  <managed-bean-scope>request</managed-bean-scope>
  <managed-property>
  <property-name>script</property-name>
  <value>/scriptname.php</value>
  </managed-property>
  </managed-bean>
  `

  See Also:
    `Invocable`, `URLReader`

Method Detail

### getValue

    public java.lang.Object getValue(int index)

  Cal the php method "getValueIndex".

  Parameters:
    `index` - The index
  Returns:
    The value at that position.

### getValue

    public java.lang.Object getValue(java.lang.Object property)

  Call the php method "getValue".

  Parameters:
    `property` - The property
  Returns:
    The value of the property.

### setValue

    public void setValue(int index,
                         java.lang.Object value)

  Call the php method "setValueIndex".

  Parameters:
    `index` - The array index
    `value` - The new value

### setValue

    public void setValue(java.lang.Object property,
                         java.lang.Object value)

  Call the php method "setValue".

  Parameters:
    `property` - The property to set
    `value` - The new value

### setScript

    public void setScript(java.lang.Object value)

  Called for the managed Property "script".

  Parameters:
    `value` - The script, for example "/helloWorld.php" or "http://.../helloWorld.php" or "@80:/.../helloWorld.php" as a short form for "http://127.0.0.1:80/.../helloWorld.php".

### call

    public java.lang.Object call(java.lang.String name,
                                 java.lang.Class[] classes,
                                 java.lang.Object[] args)

  Call a php method.

  Parameters:
    `name` - The name of the method
    `classes` - The parameters
    `args` - The arguments