input->get( 'controller')) { $path = JPATH_COMPONENT.'/controllers/'.$controller.'.php'; if (file_exists($path)) { require_once $path; } else { $controller = ''; } } // Create the controller $app = Factory::getApplication(); $classname = 'PhocaGalleryController'.ucfirst((string)$controller); $controller = new $classname( ); // Perform the Request task $controller->execute(Factory::getApplication()->input->get('task')); // Redirect if set by the controller $controller->redirect(); ?>