public function validatePlugin($plugin)
    {
        if ($plugin instanceof RouteInterface) {
            // we're okay
            return;
        }

        throw new RuntimeException(sprintf(
            'Plugin of type %s is invalid; must implement %s\RouteInterface',
            (is_object($plugin) ? get_class($plugin) : gettype($plugin)),
            __NAMESPACE__
        ));
    }
public function validatePlugin($plugin)
    {
        if ($plugin instanceof RouteInterface) {
            // we're okay
            return;
        }

        throw new RuntimeException(sprintf(
            'Plugin of type %s is invalid; must implement %s\RouteInterface',
            (is_object($plugin) ? get_class($plugin) : gettype($plugin)),
            __NAMESPACE__
        ));
    }
public function validatePlugin ( $ plugin ) { if ( $ plugin instanceof RouteInterface ) { // we're okay return ; } throw new RuntimeException ( sprintf ( 'Plugin of type %s is invalid; must implement %s\RouteInterface' , ( is_object ( $ plugin ) ? get_class ( $ plugin ) : gettype ( $ plugin ) ) , __NAMESPACE__ ) ) ; }
Validate the plugin.

Checks that the filter loaded is either a valid callback or an instance
of FilterInterface.

@param mixed $plugin

@throws RuntimeException if invalid
Validate the plugin .