1 29 30 package com.caucho.quercus.module; 31 32 import com.caucho.quercus.env.StringValue; 33 import com.caucho.quercus.env.StringValueImpl; 34 import com.caucho.quercus.env.Value; 35 36 import java.util.HashMap ; 37 import java.util.Map ; 38 39 42 public class AbstractQuercusModule implements QuercusModule { 43 protected static final int PHP_INI_USER = 1; 44 protected static final int PHP_INI_PERDIR = 2; 45 protected static final int PHP_INI_SYSTEM = 4; 46 protected static final int PHP_INI_ALL = 7; 47 48 private static final HashMap <String ,Value> NULL_MAP 49 = new HashMap <String ,Value>(); 50 51 private static final HashMap <String ,StringValue> NULL_INI_MAP 52 = new HashMap <String ,StringValue>(); 53 54 public Map <String ,Value> getConstMap() 55 { 56 return NULL_MAP; 57 } 58 59 62 public Map <String ,StringValue> getDefaultIni() 63 { 64 return NULL_INI_MAP; 65 } 66 67 70 public String []getLoadedExtensions() 71 { 72 return new String [0]; 73 } 74 75 78 protected static void addIni(Map <String ,StringValue> map, 79 String name, 80 String value, 81 int code) 82 { 83 if (value != null) 84 map.put(name, new StringValueImpl(value)); 85 else 86 map.put(name, null); 87 } 88 } 89 90 | Popular Tags |