Esempio n. 1
0
        protected override DObject EnsureItemIsObjectOverride(object key, ScriptContext /*!*/ context)
        {
            IntStringKey array_key;

            if (!Convert.ObjectToArrayKey(key, out array_key))
            {
                PhpException.IllegalOffsetType();
                context.AbortSetterChain(true);
                return(null);
            }

            // extend the setter chain if one already exists
            context.ExtendSetterChain(new RuntimeChainItem(array_key));

            return(ScriptContext.SetterChainSingletonObject);
        }
Esempio n. 2
0
        protected override void SetArrayItemOverride(object key, object value)
        {
            IntStringKey  array_key;
            ScriptContext context = ScriptContext.CurrentContext;             // TODO: context -> field

            // extend and finish the setter chain if one already exists
            if (!Convert.ObjectToArrayKey(key, out array_key))
            {
                PhpException.IllegalOffsetType();
                context.AbortSetterChain(true);
                return;
            }

            context.ExtendSetterChain(new RuntimeChainItem(array_key));
            context.FinishSetterChain(value);
            return;
        }
Esempio n. 3
0
        protected override PhpArray EnsureItemIsArrayOverride(object key)
        {
            ScriptContext context = ScriptContext.CurrentContext;

            IntStringKey array_key;

            if (!Convert.ObjectToArrayKey(key, out array_key))
            {
                PhpException.IllegalOffsetType();
                context.AbortSetterChain(true);
                return(null);
            }

            // extend the setter chain if one already exists:
            context.ExtendSetterChain(new RuntimeChainItem(array_key));

            return(this);
        }
Esempio n. 4
0
        protected override DObject EnsureItemIsObjectOverride(object key, ScriptContext/*!*/ context)
		{
			IntStringKey array_key;

			if (!Convert.ObjectToArrayKey(key, out array_key))
			{
				PhpException.IllegalOffsetType();
				context.AbortSetterChain(true);
				return null;
			}
			
			// extend the setter chain if one already exists
			context.ExtendSetterChain(new RuntimeChainItem(array_key));

			return ScriptContext.SetterChainSingletonObject;

		}