예제 #1
0
 def getImplementsOf(self, instance):
     """ returns the interfaces implemented by the instance (flat)"""
     impl = getImplements(instance)
     if not isinstance(impl, tuple):
         impl = (impl,)
     if impl:
         return flattenInterfaces(impl)
예제 #2
0
    def listInterfaces( self ):
        """ For ZMI update of interfaces. """

        results = []

        for iface in flattenInterfaces( self.__implements__ ):
            results.append( iface.__name__ )

        return results
예제 #3
0
파일: BasePlugin.py 프로젝트: goschtl/zope
    def listInterfaces( self ):
        """ For ZMI update of interfaces. """

        results = []

        for iface in flattenInterfaces( providedBy( self ) ):
            results.append( iface.__name__ )

        return results
예제 #4
0
파일: BasePlugin.py 프로젝트: goschtl/zope
    def listInterfaces( self ):
        """ For ZMI update of interfaces. """

        results = []

        for iface in flattenInterfaces( self.__implements__ ):
            results.append( iface.__name__ )

        return results
예제 #5
0
    def listInterfaces(self):
        """ For ZMI update of interfaces. """

        results = []

        for iface in flattenInterfaces(providedBy(self)):
            results.append(iface.__name__)

        return results
예제 #6
0
    def getImplementsOf(self, instance):
        """ returns the interfaces implemented by the instance (flat)"""
        from Interface.Implements import getImplements, flattenInterfaces

        impl = getImplements(instance)
        if type(impl) is not TupleType:
            impl = (impl,)
        if impl:
            return flattenInterfaces(impl)
예제 #7
0
 def getInterfacesOf(self, object):
     """Returns the list of interfaces which are implemented by the object
     """
     impl = getImplements(object)
     if impl:
         if type(impl) in (ListType, TupleType):
             result = flattenInterfaces(impl)
         else:
             result = (impl, )
         return [iface for iface in result if iface is not Interface]
예제 #8
0
 def getInterfacesOf(self, object):
     """Returns the list of interfaces which are implemented by the object
     """
     impl = getImplements(object)
     if impl:
         if type(impl) in (ListType, TupleType):
             result = flattenInterfaces(impl)
         else:
             result = (impl, )
         return [ iface for iface in result if iface is not Interface ]