Example #1
0
        //void __clone() { throw new NotImplementedException(); }
        public void __construct(Context ctx, PhpValue @class, string name)
        {
            var tinfo = ReflectionUtils.ResolvePhpTypeInfo(ctx, @class);

            _pinfo = tinfo.GetDeclaredProperty(name);

            if (_pinfo == null)
            {
                throw new ReflectionException();
            }
        }
Example #2
0
        //void __clone() { throw new NotImplementedException(); }
        public void __construct(Context ctx, PhpValue @class, string name)
        {
            var classname = @class.ToStringOrNull();

            if (classname != null)
            {
                var tinfo = ctx.GetDeclaredTypeOrThrow(classname, true);
                if (tinfo != null)
                {
                    _pinfo = tinfo.GetDeclaredProperty(name);
                }
            }

            if (_pinfo == null)
            {
                throw new ReflectionException();
            }
        }
Example #3
0
 internal ReflectionProperty(PhpPropertyInfo pinfo)
 {
     Debug.Assert(pinfo != null);
     _pinfo = pinfo;
 }
 internal ReflectionClassConstant(PhpPropertyInfo pinfo)
 {
     Debug.Assert(pinfo != null);
     _pinfo = pinfo;
 }