/** * Returns the file stream to handle the requested path * * @param PathInformation $path The path information * @param string $mode The mode used to open the path * @return FileBuffer The file buffer to handle the path */ public function createFileBuffer(PathInformation $path, $mode) { $repo = $path->getRepository(); $buffer = implode(str_repeat(PHP_EOL, 3), $repo->getLog($path->getArgument('limit'), $path->getArgument('skip'))); return new StringBuffer($buffer, array(), 'r'); }
/** * Returns the file stream to handle the requested path * * @param PathInformation $path The path information * @param string $mode The mode used to open the path * @return FileBuffer The file buffer to handle the path */ public function createFileBuffer(PathInformation $path, $mode) { $repo = $path->getRepository(); $buffer = $repo->showCommit($path->getArgument('ref')); return new StringBuffer($buffer, array(), 'r'); }