'html' => 'xml',
);
- public function __construct($path, Repository $repo)
+ public function __construct($path, Repository $repo = null)
{
$this->path = $path;
$this->repo = $repo;
return basename($this->path);
}
+ /**
+ * Return the full path to the file
+ *
+ * @return string
+ */
+ public function getPath()
+ {
+ return $this->path;
+ }
+
/**
* Get file extension without dot
*
* Yes, geshi needs to be in your include path
* We use the mediawiki geshi extension package.
*/
- require 'MediaWiki/geshi/geshi/geshi.php';
+ require_once 'MediaWiki/geshi/geshi/geshi.php';
$geshi = new \GeSHi($this->getContent(), $this->getType());
$geshi->enable_line_numbers(GESHI_NORMAL_LINE_NUMBERS);
$geshi->set_header_type(GESHI_HEADER_DIV);