X-Git-Url: https://git.cweiske.de/phorkie.git/blobdiff_plain/c87f5bbf4f85b875c96d0953c25c2ca824b534d5..93ef642c25d65519b334fecad56bf6567eeb733b:/src/phorkie/File.php diff --git a/src/phorkie/File.php b/src/phorkie/File.php index 9eb7fa7..2afda4c 100644 --- a/src/phorkie/File.php +++ b/src/phorkie/File.php @@ -38,6 +38,16 @@ class File return $this->path; } + /** + * Get the filename usable as HTML anchor. + * + * @return string + */ + function getAnchorName() + { + return str_replace(' ', '-', $this->getFilename()); + } + /** * Return the full path to the file *