class_implements

(PHP 5)

class_implements --  Return the interfaces which are implemented by the given class

Description

array class_implements ( object class )

This function returns an array with the name of the interfaces that the given class implements.

Przykład 1. class_implements() example

<?php

interface foo
{ }
class
bar implements foo {}

print_r(class_implements(new bar));

?>

Powyższy przykład wyświetli:

Array
(
    [foo] => foo
)

Hosting by: Hurra Communications Sp. z o.o.
Generated: 2007-01-26 18:02:42