/**
         * Creates a class field Foo::${bar}
         */
        public override Expr createClassField(QuercusParser parser, Expr name)
        {
            ExprFactory factory = parser.getExprFactory();

            string className        = _var;
            string specialClassName = getSpecialClassName();

            if ("self".equals(specialClassName))
            {
                className = parser.getSelfClassName();

                return(factory.createClassField(className, name));
            }
            else if ("parent".equals(specialClassName))
            {
                className = parser.getParentClassName();

                return(factory.createClassField(className, name));
            }
            else if ("static".equals(specialClassName))
            {
                return(factory.createClassVirtualField(name));
            }
            else
            {
                return(factory.createClassField(className, name));
            }
        }
예제 #2
0
        /**
         * Creates a class field $class::${foo}
         */
        public Expr createClassField(QuercusParser parser, Expr name)
        {
            ExprFactory factory = parser.getExprFactory();

            return(factory.createClassField(this, name));
        }