protected static function _findPlugin($name)
    {
        $output = null;
        $paths  = App::path('Plugin');
        $plugin = Configure::read('plugins.' . $name);

        if ($plugin !== null) {
            return $plugin;
        }

        foreach ($paths as $path) {
            $plgPath = $path . $name . DS;
            if (FS::isDir($plgPath)) {
                $output = $plgPath;
                break;
            }
        }

        return $output;
    }