Example #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)
Example #2
0
    def listInterfaces( self ):
        """ For ZMI update of interfaces. """

        results = []

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

        return results
Example #3
0
    def listInterfaces( self ):
        """ For ZMI update of interfaces. """

        results = []

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

        return results
Example #4
0
    def listInterfaces( self ):
        """ For ZMI update of interfaces. """

        results = []

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

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

        results = []

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

        return results
Example #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)
 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]
Example #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 ]