コード例 #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();
            }
        }
コード例 #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();
            }
        }
コード例 #3
0
 internal ReflectionProperty(PhpPropertyInfo pinfo)
 {
     Debug.Assert(pinfo != null);
     _pinfo = pinfo;
 }
コード例 #4
0
 internal ReflectionClassConstant(PhpPropertyInfo pinfo)
 {
     Debug.Assert(pinfo != null);
     _pinfo = pinfo;
 }