Package com.caucho.quercus.env

Examples of com.caucho.quercus.env.QuercusClass


   */
  @Override
  public Value eval(Env env)
  {
    Value qThis = env.getThis();
    QuercusClass qClass = qThis != null ? qThis.getQuercusClass() : null;
   
    if (qClass == null) {
      env.error(L.l("No calling class found for '{0}'", this));
     
      return NullValue.NULL;
    }
   
    return qClass.getStaticFieldValue(env, _varName);
  }
View Full Code Here


   */
  @Override
  public Var evalVar(Env env)
  {
    Value qThis = env.getThis();
    QuercusClass qClass = qThis != null ? qThis.getQuercusClass() : null;
   
    if (qClass == null) {
      env.error(L.l("No calling class found for '{0}'", this));
     
      return NullValue.NULL.toVar();
    }
   
    return qClass.getStaticFieldVar(env, _varName);
  }
View Full Code Here

   */
  @Override
  public Value evalAssignRef(Env env, Value value)
  {
    Value qThis = env.getThis();
    QuercusClass qClass = qThis != null ? qThis.getQuercusClass() : null;
   
    if (qClass == null) {
      env.error(L.l("No calling class found for '{0}'", this));
     
      return NullValue.NULL.toVar();
    }
   
    return qClass.setStaticFieldRef(env, _varName, value);
  }
View Full Code Here

    return new ReflectionClass(_cls);
  }
 
  public static ReflectionClass __construct(Env env, Value obj)
  {
    QuercusClass cls;
   
    if (obj.isObject())
      cls = ((ObjectValue) obj.toValue()).getQuercusClass();
    else
      cls = env.findClass(obj.toString());
View Full Code Here

    }
    else {
      String []defList = def.getInterfaces();
     
      for (int i = 0; i < defList.length; i++) {
        QuercusClass cls = env.findClass(defList[i]);
       
        findInterfaces(env, array, cls);
      }
    }
  }
View Full Code Here

    }
  }
 
  private void addInterface(Env env, ArrayValue array, String name)
  {
    QuercusClass cls = env.findClass(name);

    array.put(StringValue.create(name),
              env.wrapJava(new ReflectionClass(cls)));
  }
View Full Code Here

      return BooleanValue.FALSE;
   
    if (className == null || className.length() == 0)
      className = "SimpleXMLElement";
   
    QuercusClass cls = env.getClass(className);

    return SimpleXMLElement.create(env, cls,
                                   data, options, false,
                                   namespaceV, isPrefix);
  }
View Full Code Here

  }
 
  @ReturnNullAsFalse
  public ReflectionClass getParentClass()
  {
    QuercusClass parent = _cls.getParent();
   
    if (parent == null)
      return null;
    else
      return new ReflectionClass(parent);
View Full Code Here

                                   @Optional boolean isPrefix)
  {
    if (className == null || className.length() == 0)
      className = "SimpleXMLElement";

    QuercusClass cls = env.getClass(className);

    return SimpleXMLElement.create(env, cls,
                                   file, options, true,
                                   namespaceV, isPrefix);
  }
View Full Code Here

  @Override
  public Value eval(Env env)
  {
    String className = _className.evalString(env);
   
    QuercusClass cl = env.findClass(className);

    if (cl == null) {
      env.error(getLocation(), L.l("no matching class {0}", className));
    }

    StringValue methodName = _methodName.evalStringValue(env);
    int hash = methodName.hashCodeCaseInsensitive();
    Value []args = evalArgs(env, _args);
   
    return cl.callMethod(env, env.getThis(),
                         methodName, hash,
                         args);
  }
View Full Code Here

TOP

Related Classes of com.caucho.quercus.env.QuercusClass

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.