public function detect(&$controller) {

        $this->controller = &$controller;
        $this->name = Inflector::singularize($this->controller->name);

        #set include path for IDS  and store old one
        $path = get_include_path();
        set_include_path( VENDORS . 'phpids/');

        #require the needed files
        vendor('phpids/IDS/Init');

        #add request url and user agent
        $_REQUEST['IDS_request_uri'] = $_SERVER['REQUEST_URI'];
        if (isset($_SERVER['HTTP_USER_AGENT'])) {
            $_REQUEST['IDS_user_agent'] = $_SERVER['HTTP_USER_AGENT'];
        }

        #init the PHPIDS and pass the REQUEST array
        $this->init = IDS_Init::init();
        $ids        = new IDS_Monitor($_REQUEST, $this->init);
        $result     = $ids->run();

        // Re-set include path
        set_include_path($path);

        if (!$result->isEmpty()) {
            $this->react($result);
        }

        return true;
    }