com.caucho.quercus.module
Class IniDefinition

java.lang.Object
  extended by com.caucho.quercus.module.IniDefinition
Direct Known Subclasses:
IniDefinition.Runtime, IniDefinition.Unsupported

public class IniDefinition
extends java.lang.Object


Nested Class Summary
static class IniDefinition.Runtime
           
static class IniDefinition.Type
           
static class IniDefinition.Unsupported
           
 
Field Summary
static IniDefinition NULL
           
static int PHP_INI_ALL
           
static int PHP_INI_PERDIR
           
static int PHP_INI_SYSTEM
           
static int PHP_INI_USER
           
 
Constructor Summary
IniDefinition(java.lang.String name, IniDefinition.Type type, Value deflt, int scope)
           
 
Method Summary
 boolean getAsBoolean(Env env)
           
 boolean getAsBoolean(QuercusContext quercus)
           
 BooleanValue getAsBooleanValue(Env env)
           
 BooleanValue getAsBooleanValue(QuercusContext quercus)
           
 long getAsLong(Env env)
           
 long getAsLongBytes(Env env, long deflt)
           
 LongValue getAsLongValue(Env env)
           
 LongValue getAsLongValue(QuercusContext quercus)
           
 java.lang.String getAsString(Env env)
           
 StringValue getAsStringValue(Env env)
           
 StringValue getAsStringValue(QuercusContext quercus)
           
protected  Value getDefault()
          Returns the default value of the ini definition.
protected  java.lang.String getName()
          Returns the name of the ini definition.
 int getScope()
          Returns the scope in which the value of the ini variable can be set.
 Value getValue(Env env)
          Returns the value set for name, the first oof the local value set for the environment, the global configuration value set for quercus, or the default from the definition.
 Value getValue(QuercusContext quercus)
          Returns the value set for name, or the default from the definition if it has not been set.
 boolean isRuntimeDefinition()
          Returns true if this definition was added at runtime and not definied by a module.
 void set(Env env, java.lang.String value)
          Set the ini value for the given scope.
 void set(Env env, Value value)
          Set the ini value for the given scope.
protected  void set(java.util.HashMap<java.lang.String,Value> map, int scope, Value value)
          Set the ini value for the given scope.
 void set(QuercusContext quercus, java.lang.String value)
          Set the ini value for the given scope.
 void set(QuercusContext quercus, Value value)
          Set the ini value for the given scope.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

PHP_INI_USER

public static final int PHP_INI_USER
See Also:
Constant Field Values

PHP_INI_PERDIR

public static final int PHP_INI_PERDIR
See Also:
Constant Field Values

PHP_INI_SYSTEM

public static final int PHP_INI_SYSTEM
See Also:
Constant Field Values

PHP_INI_ALL

public static final int PHP_INI_ALL
See Also:
Constant Field Values

NULL

public static IniDefinition NULL
Constructor Detail

IniDefinition

public IniDefinition(java.lang.String name,
                     IniDefinition.Type type,
                     Value deflt,
                     int scope)
Method Detail

getName

protected java.lang.String getName()
Returns the name of the ini definition.


getDefault

protected Value getDefault()
Returns the default value of the ini definition.


getScope

public int getScope()
Returns the scope in which the value of the ini variable can be set.


isRuntimeDefinition

public boolean isRuntimeDefinition()
Returns true if this definition was added at runtime and not definied by a module.


set

public void set(QuercusContext quercus,
                Value value)
Set the ini value for the given scope.


set

public void set(QuercusContext quercus,
                java.lang.String value)
Set the ini value for the given scope.


set

public void set(Env env,
                Value value)
Set the ini value for the given scope.


set

public void set(Env env,
                java.lang.String value)
Set the ini value for the given scope.


set

protected void set(java.util.HashMap<java.lang.String,Value> map,
                   int scope,
                   Value value)
Set the ini value for the given scope.


getValue

public Value getValue(QuercusContext quercus)
Returns the value set for name, or the default from the definition if it has not been set.


getValue

public Value getValue(Env env)
Returns the value set for name, the first oof the local value set for the environment, the global configuration value set for quercus, or the default from the definition.


getAsStringValue

public StringValue getAsStringValue(QuercusContext quercus)

getAsStringValue

public StringValue getAsStringValue(Env env)

getAsString

public java.lang.String getAsString(Env env)

getAsBoolean

public boolean getAsBoolean(QuercusContext quercus)

getAsBoolean

public boolean getAsBoolean(Env env)

getAsBooleanValue

public BooleanValue getAsBooleanValue(QuercusContext quercus)

getAsBooleanValue

public BooleanValue getAsBooleanValue(Env env)

getAsLongValue

public LongValue getAsLongValue(QuercusContext quercus)

getAsLongValue

public LongValue getAsLongValue(Env env)

getAsLong

public long getAsLong(Env env)

getAsLongBytes

public long getAsLongBytes(Env env,
                           long deflt)