public function set_callback_options($class, array $argarray, $component) {
        global $CFG;

        // Require the base class first before any other files.
        require_once($CFG->libdir . '/portfolio/caller.php');

        // Include any potential callback files and check for errors.
        portfolio_include_callback_file($component, $class);

        // This will throw exceptions but should not actually do anything other than verify callbackargs.
        $test = new $class($argarray);
        unset($test);

        $this->callbackcomponent = $component;
        $this->callbackclass = $class;
        $this->callbackargs = $argarray;
    }