Beispiel #1
0
        /// <summary>
        /// Populates the provided <see cref="DTypeDesc"/> with this class's methods and properties.
        /// This is called to fill the type description table with dynamic stubs. They are called then in runtime.
        /// </summary>
        /// <param name="typeDesc">The type desc to populate.</param>
        private static void __PopulateTypeDesc(PhpTypeDesc typeDesc)
        {
            typeDesc.SetStaticInit(MyPhpClass.__InitializeStaticFields);

            typeDesc.AddMethod("Foo", PhpMemberAttributes.Public, Foo);
            typeDesc.AddMethod("__construct", PhpMemberAttributes.Public, __construct);

            typeDesc.AddProperty("x", PhpMemberAttributes.Public, __get_x, __set_x);
            typeDesc.AddProperty("y", PhpMemberAttributes.Public | PhpMemberAttributes.Static, __get_y, __set_y);
        }
Beispiel #2
0
        /// <summary>
        /// Populates the provided <see cref="DTypeDesc"/> with this class's methods and properties.
        /// </summary>
        /// <param name="typeDesc">The type desc to populate.</param>
        private static void __PopulateTypeDesc(PhpTypeDesc typeDesc)
        {
            typeDesc.AddMethod("read", PhpMemberAttributes.Public, read);
            typeDesc.AddMethod("rewind", PhpMemberAttributes.Public, rewind);
            typeDesc.AddMethod("close", PhpMemberAttributes.Public, close);

            typeDesc.AddProperty("handle", PhpMemberAttributes.Public,
                                 (instance) => ((Directory)instance).handle,
                                 (instance, value) => ((Directory)instance).handle = (PhpReference)value);
            typeDesc.AddProperty("path", PhpMemberAttributes.Public,
                                 (instance) => ((Directory)instance).path,
                                 (instance, value) => ((Directory)instance).path = (PhpReference)value);
        }
Beispiel #3
0
        /// <summary>
        /// Populates the provided <see cref="DTypeDesc"/> with this class's methods and properties.
        /// </summary>
        /// <param name="typeDesc">The type desc to populate.</param>
        internal static void __PopulateTypeDesc(PhpTypeDesc typeDesc)
        {
            typeDesc.AddMethod("__construct", PhpMemberAttributes.Public, __construct);
            typeDesc.AddMethod("__toString", PhpMemberAttributes.Public, __toString);
            typeDesc.AddMethod("getMessage", PhpMemberAttributes.Public, getMessage);
            typeDesc.AddMethod("getCode", PhpMemberAttributes.Public, getCode);
            typeDesc.AddMethod("getFile", PhpMemberAttributes.Public, getFile);
            typeDesc.AddMethod("getTrace", PhpMemberAttributes.Public, getTrace);
            typeDesc.AddMethod("getPrevious", PhpMemberAttributes.Public, getPrevious);
            typeDesc.AddMethod("getTraceAsString", PhpMemberAttributes.Public, getTraceAsString);
            typeDesc.AddMethod("getLine", PhpMemberAttributes.Public, getLine);
            typeDesc.AddMethod("getColumn", PhpMemberAttributes.Public, getColumn);

            typeDesc.AddProperty("message", PhpMemberAttributes.Protected, __get_message, __set_message);
            typeDesc.AddProperty("code", PhpMemberAttributes.Protected, __get_code, __set_code);
            typeDesc.AddProperty("file", PhpMemberAttributes.Protected, __get_file, __set_file);
            typeDesc.AddProperty("line", PhpMemberAttributes.Protected, __get_line, __set_line);
            typeDesc.AddProperty("column", PhpMemberAttributes.Protected, __get_column, __set_column);
        }
Beispiel #4
0
 /// <summary>
 /// Populates the provided <see cref="DTypeDesc"/> with this class's methods and properties.
 /// </summary>
 /// <param name="typeDesc">The type desc to populate.</param>
 internal static void __PopulateTypeDesc(PhpTypeDesc typeDesc)
 {
     typeDesc.AddProperty(ClassNameFieldName, PhpMemberAttributes.Public,
                          (instance) => ((__PHP_Incomplete_Class)instance).__PHP_Incomplete_Class_Name,
                          (instance, value) => ((__PHP_Incomplete_Class)instance).__PHP_Incomplete_Class_Name = (PhpReference)value);
 }
Beispiel #5
0
        /// <summary>
        /// Populates the provided <see cref="DTypeDesc"/> with this class's methods and properties.
        /// This is called to fill the type description table with dynamic stubs. They are called then in runtime.
        /// </summary>
        /// <param name="typeDesc">The type desc to populate.</param>
        private static void __PopulateTypeDesc(PhpTypeDesc typeDesc)
        {
            typeDesc.SetStaticInit(MyPhpClass.__InitializeStaticFields);

            typeDesc.AddMethod("Foo", PhpMemberAttributes.Public, Foo);
            typeDesc.AddMethod("__construct", PhpMemberAttributes.Public, __construct);

            typeDesc.AddProperty("x", PhpMemberAttributes.Public, __get_x, __set_x);
            typeDesc.AddProperty("y", PhpMemberAttributes.Public | PhpMemberAttributes.Static, __get_y, __set_y);
        }
Beispiel #6
0
		/// <summary>
		/// Populates the provided <see cref="DTypeDesc"/> with this class's methods and properties.
		/// </summary>
		/// <param name="typeDesc">The type desc to populate.</param>
		internal static void __PopulateTypeDesc(PhpTypeDesc typeDesc)
		{
			typeDesc.AddMethod("__construct", PhpMemberAttributes.Public, __construct);
			typeDesc.AddMethod("__toString", PhpMemberAttributes.Public, __toString);
			typeDesc.AddMethod("getMessage", PhpMemberAttributes.Public, getMessage);
			typeDesc.AddMethod("getCode", PhpMemberAttributes.Public, getCode);
			typeDesc.AddMethod("getFile", PhpMemberAttributes.Public, getFile);
			typeDesc.AddMethod("getTrace", PhpMemberAttributes.Public, getTrace);
            typeDesc.AddMethod("getPrevious", PhpMemberAttributes.Public, getPrevious);
			typeDesc.AddMethod("getTraceAsString", PhpMemberAttributes.Public, getTraceAsString);
			typeDesc.AddMethod("getLine", PhpMemberAttributes.Public, getLine);
			typeDesc.AddMethod("getColumn", PhpMemberAttributes.Public, getColumn);

			typeDesc.AddProperty("message", PhpMemberAttributes.Protected, __get_message, __set_message);
			typeDesc.AddProperty("code", PhpMemberAttributes.Protected, __get_code, __set_code);
			typeDesc.AddProperty("file", PhpMemberAttributes.Protected, __get_file, __set_file);
			typeDesc.AddProperty("line", PhpMemberAttributes.Protected, __get_line, __set_line);
			typeDesc.AddProperty("column", PhpMemberAttributes.Protected, __get_column, __set_column);
		}
		private static void __PopulateTypeDesc(PhpTypeDesc desc)
		{
			desc.AddProperty("nodeName", PhpMemberAttributes.Public, new GetterDelegate(DOMElement.__get_nodeName), null);
			desc.AddProperty("nodeValue", PhpMemberAttributes.Public, new GetterDelegate(DOMElement.__get_nodeValue), new SetterDelegate(DOMElement.__set_nodeValue));
			desc.AddProperty("namespaceURI", PhpMemberAttributes.Public, new GetterDelegate(DOMElement.__get_namespaceURI), null);
			desc.AddProperty("nodeType", PhpMemberAttributes.Public, new GetterDelegate(DOMElement.__get_nodeType), null);
			desc.AddProperty("attributes", PhpMemberAttributes.Public, new GetterDelegate(DOMElement.__get_attributes), null);
			desc.AddProperty("tagName", PhpMemberAttributes.Public, new GetterDelegate(DOMElement.__get_tagName), null);
			desc.AddMethod("__construct", PhpMemberAttributes.Public, new RoutineDelegate(DOMElement.__construct));
			desc.AddMethod("getAttribute", PhpMemberAttributes.Public, new RoutineDelegate(DOMElement.getAttribute));
			desc.AddMethod("getAttributeNS", PhpMemberAttributes.Public, new RoutineDelegate(DOMElement.getAttributeNS));
			desc.AddMethod("setAttribute", PhpMemberAttributes.Public, new RoutineDelegate(DOMElement.setAttribute));
			desc.AddMethod("setAttributeNS", PhpMemberAttributes.Public, new RoutineDelegate(DOMElement.setAttributeNS));
			desc.AddMethod("removeAttribute", PhpMemberAttributes.Public, new RoutineDelegate(DOMElement.removeAttribute));
			desc.AddMethod("removeAttributeNS", PhpMemberAttributes.Public, new RoutineDelegate(DOMElement.removeAttributeNS));
			desc.AddMethod("getAttributeNode", PhpMemberAttributes.Public, new RoutineDelegate(DOMElement.getAttributeNode));
			desc.AddMethod("getAttributeNodeNS", PhpMemberAttributes.Public, new RoutineDelegate(DOMElement.getAttributeNodeNS));
			desc.AddMethod("setAttributeNode", PhpMemberAttributes.Public, new RoutineDelegate(DOMElement.setAttributeNode));
			desc.AddMethod("setAttributeNodeNS", PhpMemberAttributes.Public, new RoutineDelegate(DOMElement.setAttributeNodeNS));
			desc.AddMethod("removeAttributeNode", PhpMemberAttributes.Public, new RoutineDelegate(DOMElement.removeAttributeNode));
			desc.AddMethod("hasAttribute", PhpMemberAttributes.Public, new RoutineDelegate(DOMElement.hasAttribute));
			desc.AddMethod("hasAttributeNS", PhpMemberAttributes.Public, new RoutineDelegate(DOMElement.hasAttributeNS));
			desc.AddMethod("getElementsByTagName", PhpMemberAttributes.Public, new RoutineDelegate(DOMElement.getElementsByTagName));
			desc.AddMethod("getElementsByTagNameNS", PhpMemberAttributes.Public, new RoutineDelegate(DOMElement.getElementsByTagNameNS));
			desc.AddMethod("setIdAttribute", PhpMemberAttributes.Public, new RoutineDelegate(DOMElement.setIdAttribute));
			desc.AddMethod("setIdAttributeNS", PhpMemberAttributes.Public, new RoutineDelegate(DOMElement.setIdAttributeNS));
			desc.AddMethod("setIdAttributeNode", PhpMemberAttributes.Public, new RoutineDelegate(DOMElement.setIdAttributeNode));
		}
Beispiel #8
0
		private static void __PopulateTypeDesc(PhpTypeDesc desc)
		{
			desc.AddProperty("document", PhpMemberAttributes.Public, new GetterDelegate(DOMXPath.__get_document), null);
			desc.AddMethod("__construct", PhpMemberAttributes.Public, new RoutineDelegate(DOMXPath.__construct));
			desc.AddMethod("registerNamespace", PhpMemberAttributes.Public, new RoutineDelegate(DOMXPath.registerNamespace));
			desc.AddMethod("query", PhpMemberAttributes.Public, new RoutineDelegate(DOMXPath.query));
			desc.AddMethod("evaluate", PhpMemberAttributes.Public, new RoutineDelegate(DOMXPath.evaluate));
		}
		private static void __PopulateTypeDesc(PhpTypeDesc desc)
		{
			desc.AddProperty("code", PhpMemberAttributes.Public, new GetterDelegate(DOMException.__get_code), null);
		}
		private static void __PopulateTypeDesc(PhpTypeDesc desc)
		{
			desc.AddProperty("length", PhpMemberAttributes.Public, new GetterDelegate(DOMNodeList.__get_length), null);
			desc.AddMethod("item", PhpMemberAttributes.Public, new RoutineDelegate(DOMNodeList.item));
		}
		private static void __PopulateTypeDesc(PhpTypeDesc desc)
		{
			desc.AddProperty("length", PhpMemberAttributes.Public, new GetterDelegate(DOMNameList.__get_length), null);
			desc.AddMethod("getName", PhpMemberAttributes.Public, new RoutineDelegate(DOMNameList.getName));
			desc.AddMethod("getNamespaceURI", PhpMemberAttributes.Public, new RoutineDelegate(DOMNameList.getNamespaceURI));
		}
		private static void __PopulateTypeDesc(PhpTypeDesc desc)
		{
			desc.AddProperty("length", PhpMemberAttributes.Public, new GetterDelegate(DOMNamedNodeMap.__get_length), null);
			desc.AddMethod("getNamedItem", PhpMemberAttributes.Public, new RoutineDelegate(DOMNamedNodeMap.getNamedItem));
			desc.AddMethod("setNamedItem", PhpMemberAttributes.Public, new RoutineDelegate(DOMNamedNodeMap.setNamedItem));
			desc.AddMethod("removeNamedItem", PhpMemberAttributes.Public, new RoutineDelegate(DOMNamedNodeMap.removeNamedItem));
			desc.AddMethod("item", PhpMemberAttributes.Public, new RoutineDelegate(DOMNamedNodeMap.item));
			desc.AddMethod("getNamedItemNS", PhpMemberAttributes.Public, new RoutineDelegate(DOMNamedNodeMap.getNamedItemNS));
			desc.AddMethod("setNamedItemNS", PhpMemberAttributes.Public, new RoutineDelegate(DOMNamedNodeMap.setNamedItemNS));
			desc.AddMethod("removeNamedItemNS", PhpMemberAttributes.Public, new RoutineDelegate(DOMNamedNodeMap.removeNamedItemNS));
		}
		/// <summary>
		/// Populates the provided <see cref="DTypeDesc"/> with this class's methods and properties.
		/// </summary>
		/// <param name="typeDesc">The type desc to populate.</param>
		private static void __PopulateTypeDesc(PhpTypeDesc typeDesc)
		{
			typeDesc.AddMethod("read", PhpMemberAttributes.Public, read);
			typeDesc.AddMethod("rewind", PhpMemberAttributes.Public, rewind);
			typeDesc.AddMethod("close", PhpMemberAttributes.Public, close);

            typeDesc.AddProperty("handle", PhpMemberAttributes.Public,
                    (instance) => ((Directory)instance).handle,
                    (instance, value) => ((Directory)instance).handle = (PhpReference)value);
            typeDesc.AddProperty("path", PhpMemberAttributes.Public,
                    (instance) => ((Directory)instance).path,
                    (instance, value) => ((Directory)instance).path = (PhpReference)value);
		}
		private static void __PopulateTypeDesc(PhpTypeDesc desc)
		{
			desc.AddProperty("nodeName", PhpMemberAttributes.Public, new GetterDelegate(DOMAttr.__get_nodeName), null);
			desc.AddProperty("nodeValue", PhpMemberAttributes.Public, new GetterDelegate(DOMAttr.__get_nodeValue), new SetterDelegate(DOMAttr.__set_nodeValue));
			desc.AddProperty("namespaceURI", PhpMemberAttributes.Public, new GetterDelegate(DOMAttr.__get_namespaceURI), null);
			desc.AddProperty("nodeType", PhpMemberAttributes.Public, new GetterDelegate(DOMAttr.__get_nodeType), null);
			desc.AddProperty("name", PhpMemberAttributes.Public, new GetterDelegate(DOMAttr.__get_name), null);
			desc.AddProperty("value", PhpMemberAttributes.Public, new GetterDelegate(DOMAttr.__get_value), new SetterDelegate(DOMAttr.__set_value));
			desc.AddProperty("ownerElement", PhpMemberAttributes.Public, new GetterDelegate(DOMAttr.__get_ownerElement), null);
			desc.AddProperty("schemaTypeInfo", PhpMemberAttributes.Public, new GetterDelegate(DOMAttr.__get_schemaTypeInfo), null);
			desc.AddMethod("__construct", PhpMemberAttributes.Public, new RoutineDelegate(DOMAttr.__construct));
			desc.AddMethod("isId", PhpMemberAttributes.Public, new RoutineDelegate(DOMAttr.isId));
		}
Beispiel #15
0
		private static void __PopulateTypeDesc(PhpTypeDesc desc)
		{
			desc.AddProperty("nodeType", PhpMemberAttributes.Public, new GetterDelegate(DOMEntity.__get_nodeType), null);
			desc.AddProperty("publicId", PhpMemberAttributes.Public, new GetterDelegate(DOMEntity.__get_publicId), null);
			desc.AddProperty("systemId", PhpMemberAttributes.Public, new GetterDelegate(DOMEntity.__get_systemId), null);
			desc.AddProperty("notationName", PhpMemberAttributes.Public, new GetterDelegate(DOMEntity.__get_notationName), null);
			desc.AddProperty("actualEncoding", PhpMemberAttributes.Public, new GetterDelegate(DOMEntity.__get_actualEncoding), new SetterDelegate(DOMEntity.__set_actualEncoding));
			desc.AddProperty("encoding", PhpMemberAttributes.Public, new GetterDelegate(DOMEntity.__get_encoding), new SetterDelegate(DOMEntity.__set_encoding));
			desc.AddProperty("version", PhpMemberAttributes.Public, new GetterDelegate(DOMEntity.__get_version), new SetterDelegate(DOMEntity.__set_version));
		}
Beispiel #16
0
		private static void __PopulateTypeDesc(PhpTypeDesc desc)
		{
			desc.AddProperty("nodeName", PhpMemberAttributes.Public, new GetterDelegate(DOMEntityReference.__get_nodeName), null);
			desc.AddProperty("nodeValue", PhpMemberAttributes.Public, new GetterDelegate(DOMEntityReference.__get_nodeValue), new SetterDelegate(DOMEntityReference.__set_nodeValue));
			desc.AddProperty("namespaceURI", PhpMemberAttributes.Public, new GetterDelegate(DOMEntityReference.__get_namespaceURI), null);
			desc.AddProperty("nodeType", PhpMemberAttributes.Public, new GetterDelegate(DOMEntityReference.__get_nodeType), null);
			desc.AddMethod("__construct", PhpMemberAttributes.Public, new RoutineDelegate(DOMEntityReference.__construct));
		}