Exemple #1
0
        public static object __construct(object instance, PhpStack stack)
        {
            var filename = stack.PeekValue(1);

            stack.RemoveFrame();
            return(((SplFileInfo)instance).__construct(stack.Context, filename));
        }
Exemple #2
0
        public static new object __construct(object instance, PhpStack stack)
        {
            var path = stack.PeekValue(1);

            stack.RemoveFrame();
            return(((DirectoryIterator)instance).__construct(stack.Context, path));
        }
Exemple #3
0
        public static object seek(object instance, PhpStack stack)
        {
            object position = stack.PeekValue(1);

            stack.RemoveFrame();
            return(((DirectoryIterator)instance).seek(stack.Context, position));
        }
Exemple #4
0
        public static new object __construct(object instance, PhpStack stack)
        {
            var arg1 = stack.PeekValue(1);

            stack.RemoveFrame();
            return(((SplFileObject)instance).__construct(stack.Context, arg1));
        }
Exemple #5
0
        public static object seek(object instance, PhpStack stack)
        {
            var arg1 = stack.PeekValue(1);

            stack.RemoveFrame();
            return(((SplFileObject)instance).seek(stack.Context, arg1));
        }
Exemple #6
0
        public static object offsetExists(object instance, PhpStack stack)
        {
            var index = stack.PeekValue(1);

            stack.RemoveFrame();
            return(((ArrayObject)instance).offsetExists(stack.Context, index));
        }
Exemple #7
0
        public static object hasChildren(object instance, PhpStack stack)
        {
            var allowLinks = stack.PeekValueOptional(1);

            stack.RemoveFrame();
            return(((RecursiveDirectoryIterator)instance).hasChildren(stack.Context /*, allowLinks*/));
        }
Exemple #8
0
        public static object uksort(object instance, PhpStack stack)
        {
            var cmp_function = stack.PeekValue(1);

            stack.RemoveFrame();
            return(((ArrayObject)instance).uksort(stack.Context, cmp_function));
        }
Exemple #9
0
        public static object unserialize(object instance, PhpStack stack)
        {
            var serialized = stack.PeekValue(1);

            stack.RemoveFrame();
            return(((ArrayObject)instance).unserialize(stack.Context, serialized));
        }
Exemple #10
0
        public static object setIteratorClass(object instance, PhpStack stack)
        {
            var iterator_class = stack.PeekValue(1);

            stack.RemoveFrame();
            return(((ArrayObject)instance).setIteratorClass(stack.Context, iterator_class));
        }
Exemple #11
0
        public static object setFlags(object instance, PhpStack stack)
        {
            var flags = stack.PeekValue(1);

            stack.RemoveFrame();
            return(((ArrayObject)instance).setFlags(stack.Context, flags));
        }
Exemple #12
0
        public static object exchangeArray(object instance, PhpStack stack)
        {
            var input = stack.PeekValue(1);

            stack.RemoveFrame();
            return(((ArrayObject)instance).exchangeArray(stack.Context, input));
        }
Exemple #13
0
        public static object getOffset(object instance, PhpStack stack)
        {
            var arg1 = stack.PeekValue(1);

            stack.RemoveFrame();
            return(((DateTimeZone)instance).getOffset(stack.Context, arg1));
        }
Exemple #14
0
        public static object addEmptyDir(object instance, PhpStack stack)
        {
            object dirname = stack.PeekValue(1);

            stack.RemoveFrame();
            return(((ZipArchive)instance).addEmptyDir(stack.Context, dirname));
        }
Exemple #15
0
        public static object offsetUnset(object instance, PhpStack stack)
        {
            object index = stack.PeekValue(1);

            stack.RemoveFrame();
            return(((ArrayAccess)instance).offsetUnset(stack.Context, index));
        }
Exemple #16
0
        public static object getStream(object instance, PhpStack stack)
        {
            object name = stack.PeekValue(1);

            stack.RemoveFrame();
            return(((ZipArchive)instance).getStream(stack.Context, name));
        }
Exemple #17
0
        public static object deleteIndex(object instance, PhpStack stack)
        {
            object index = stack.PeekValue(1);

            stack.RemoveFrame();
            return(((ZipArchive)instance).deleteIndex(stack.Context, index));
        }
Exemple #18
0
        public static object getArchiveComment(object instance, PhpStack stack)
        {
            object flags = stack.PeekValue(1);

            stack.RemoveFrame();
            return(((ZipArchive)instance).getArchiveComment(stack.Context, flags));
        }
Exemple #19
0
        public static object getProperty(object instance, PhpStack stack)
        {
            var name = stack.PeekValueOptional(1);

            stack.RemoveFrame();
            return(((ReflectionClass)instance).getProperty(stack.Context, name));
        }
Exemple #20
0
        public static object Remove(object instance, PhpStack stack)
        {
            object arg = stack.PeekValue(1);

            stack.RemoveFrame();
            return(((EventClass <T>)instance).Remove(stack.Context, arg));
        }
Exemple #21
0
        public static object append(object instance, PhpStack stack)
        {
            var value = stack.PeekValue(1);

            stack.RemoveFrame();
            return(((ArrayObject)instance).append(stack.Context, value));
        }
Exemple #22
0
        public static object getMethods(object instance, PhpStack stack)
        {
            var filter = stack.PeekValueOptional(1);

            stack.RemoveFrame();
            return(((ReflectionClass)instance).getMethods(stack.Context, filter));
        }
Exemple #23
0
        public static object hasProperty(object instance, PhpStack stack)
        {
            object args = stack.PeekValue(1);

            stack.RemoveFrame();
            return(((ReflectionClass)instance).hasProperty(stack.Context, args));
        }
Exemple #24
0
        public static object getConstant(object instance, PhpStack stack)
        {
            object argName = stack.PeekValue(1);

            stack.RemoveFrame();
            return(((ReflectionClass)instance).getConstant(stack.Context, argName));
        }
Exemple #25
0
        public static object isSubclassOf(object instance, PhpStack stack)
        {
            var @class = stack.PeekValue(1);

            stack.RemoveFrame();
            return(((ReflectionClass)instance).isSubclassOf(stack.Context, @class));
        }
Exemple #26
0
        public static object newInstanceArgs(object instance, PhpStack stack)
        {
            object args = stack.PeekValue(1);

            stack.RemoveFrame();
            return(((ReflectionClass)instance).newInstanceArgs(stack.Context, args));
        }
Exemple #27
0
        public static object __construct(object instance, PhpStack stack)
        {
            object argument = stack.PeekValue(1);

            stack.RemoveFrame();
            return(((ReflectionClass)instance).__construct(stack.Context, argument));
        }
Exemple #28
0
        public static object isInstance(object instance, PhpStack stack)
        {
            var obj = stack.PeekValue(1);

            stack.RemoveFrame();
            return(((ReflectionClass)instance).isInstance(stack.Context, obj));
        }
Exemple #29
0
        public static object setArchiveComment(object instance, PhpStack stack)
        {
            object comment = stack.PeekValue(1);

            stack.RemoveFrame();
            return(((ZipArchive)instance).setArchiveComment(stack.Context, comment));
        }
Exemple #30
0
        public static object implementsInterface(object instance, PhpStack stack)
        {
            var ifacename = stack.PeekValue(1);

            stack.RemoveFrame();
            return(((ReflectionClass)instance).implementsInterface(stack.Context, ifacename));
        }
Exemple #31
0
		/// <summary>
		/// Dispatches the invocation to a constructed method according to type arguments on the stack.
		/// </summary>
		/// <remarks>
		/// Constructed methods are cached in the <see cref="instantiations"/> dictionary.
		/// </remarks>
		private object ArglessPreStub(object instance, PhpStack/*!*/ stack)
		{
			// get type arguments from the stack
			DTypeDescs type_args = new DTypeDescs(stack);

			ClrMethodDesc method_desc;
			lock (instantiations)
			{
				if (!instantiations.TryGetValue(type_args, out method_desc))
				{
					method_desc = ConstructMethodDesc(type_args);
					if (method_desc == null) return null;

					instantiations.Add(type_args, method_desc);
				}
			}

			return method_desc.ArglessStub(instance, stack);
		}
Exemple #32
0
		public object Invoke(DObject instance, PhpStack stack, DTypeDesc caller)
		{
			stack.AllowProtectedCall = AllowProtectedCall(caller);
			return Invoke(instance, stack);
		}
Exemple #33
0
		public object Invoke(DObject instance, PhpStack stack)
		{
			return ArglessStub(instance == null ? null : instance.InstanceObject, stack);
		}