public function matchPlugins(array $plugins, array $hints)
    {
        $out = array();

        foreach ($hints as $key) {
            if (isset($plugins[$key])) {
                $out[$key] = $plugins[$key];
            }
        }

        return $out;
    }
public function matchPlugins(array $plugins, array $hints)
    {
        $out = array();

        foreach ($hints as $key) {
            if (isset($plugins[$key])) {
                $out[$key] = $plugins[$key];
            }
        }

        return $out;
    }
public function matchPlugins ( array $ plugins , array $ hints ) { $ out = array ( ) ; foreach ( $ hints as $ key ) { if ( isset ( $ plugins [ $ key ] ) ) { $ out [ $ key ] = $ plugins [ $ key ] ; } } return $ out ; }
Returns the first compatible plugin available.

@param array $plugins Array of hints to class strings
@param array $hints   Array of object hints

@return array Array of hints to class strings filtered and sorted by object hints
Returns the first compatible plugin available .