Exemple #1
0
        /// <summary>
        /// Specifies dynamic behavior for get operation for static variable
        /// </summary>
        public override bool TryGetMember(
            GetMemberBinder binder,
            out Object result
            )
        {
            if (binder.Name == ConstID)
            {
                result = new ConstsScope(Context, type);
                return(true);
            }

            result = PhpVariable.Unwrap(PhpVariable.Dereference(Operators.GetStaticProperty(type, binder.Name, null, Context, false)));
            return(true);
        }
Exemple #2
0
        /// <summary>
        /// Specifies dynamic behavior for get operation for static variable
        /// </summary>
        public override bool TryGetMember(
            GetMemberBinder binder,
            out Object result
        )
        {
            if (binder.Name == ConstID)
            {
                result = new ConstsScope(Context,type);
                return true;
            }

            result = PhpVariable.Unwrap(PhpVariable.Dereference(Operators.GetStaticProperty(type, binder.Name, null, Context, false)));
            return true;
        }