protected function generateImplements(\ReflectionClass $reflectionClass)
    {

        // load the class interfaces
        $interfaces = $reflectionClass->getInterfaces();

        // initialize the array for the
        $generateInterfaces = array();

        // iterate over the specified interfaces
        foreach ($interfaces as $interfaceName => $interface) {
            // clean them up to avoid doubles
            foreach ($generateInterfaces as $obj) {
                if ($obj->isSubclassOf($interface)) {
                    continue 2;
                }
            }

            // traversable interface can not be implemented directly, so ignore it
            if ($interface->getName() === 'Traversable') {
                continue;
            }

            // append the interface
            $generateInterfaces[sprintf('\\%s', $interfaceName)] = $interface;
        }

        // implode the interfaces and return them as string
        return implode(', ', array_keys($generateInterfaces));
    }
protected function generateImplements(\ReflectionClass $reflectionClass)
    {

        // load the class interfaces
        $interfaces = $reflectionClass->getInterfaces();

        // initialize the array for the
        $generateInterfaces = array();

        // iterate over the specified interfaces
        foreach ($interfaces as $interfaceName => $interface) {
            // clean them up to avoid doubles
            foreach ($generateInterfaces as $obj) {
                if ($obj->isSubclassOf($interface)) {
                    continue 2;
                }
            }

            // traversable interface can not be implemented directly, so ignore it
            if ($interface->getName() === 'Traversable') {
                continue;
            }

            // append the interface
            $generateInterfaces[sprintf('\\%s', $interfaceName)] = $interface;
        }

        // implode the interfaces and return them as string
        return implode(', ', array_keys($generateInterfaces));
    }
protected function generateImplements ( \ ReflectionClass $ reflectionClass ) { // load the class interfaces $ interfaces = $ reflectionClass -> getInterfaces ( ) ; // initialize the array for the $ generateInterfaces = array ( ) ; // iterate over the specified interfaces foreach ( $ interfaces as $ interfaceName => $ interface ) { // clean them up to avoid doubles foreach ( $ generateInterfaces as $ obj ) { if ( $ obj -> isSubclassOf ( $ interface ) ) { continue 2 ; } } // traversable interface can not be implemented directly, so ignore it if ( $ interface -> getName ( ) === 'Traversable' ) { continue ; } // append the interface $ generateInterfaces [ sprintf ( '\\%s' , $ interfaceName ) ] = $ interface ; } // implode the interfaces and return them as string return implode ( ', ' , array_keys ( $ generateInterfaces ) ) ; }
Generate the implements part of the class definition.

@param \ReflectionClass $reflectionClass The reflection class to generate the implements part for

@return string The implements part of the class definition
Generate the implements part of the class definition .