/** * Get a component object, injecting the supplied request so that we can * test different responses. * * @param Request $request * @return \Dewdrop\Admin\ComponentAbstract */ public function getComponent(Request $request) { $paths = new Paths(); $file = $paths->getAdmin() . '/' . $this->componentFolder . '/Component.php'; $className = 'Admin\\' . $this->componentNamespace . '\\Component'; require_once $file; return new $className($this->getDb(), $paths, $request); }