/** * Show project overview * * @param RMF\Request $request * @return Struct\Response */ public function show(RMF\Request $request) { $path = $request->variables['path'] ?: '/'; $source = array(); $annotations = array(); $index = array(); if (file_exists($file = $this->source . '/' . $path) && is_file($file)) { $processor = $this->factory->factory($file); $processor->addAnnotations($annotations = $this->gateway->getAnnotationsForFile($path)); $source = $processor->getSourceData(); $index = $processor->getIndex(); } return new Struct\Response('source.twig', array('path' => $path, 'tree' => $this->getSourceTree($path), 'source' => $source, 'index' => $index, 'annotations' => $annotations, 'dependencies' => $this->getClassMetainformation($path))); }