diff --git a/README.md b/README.md index 24da7a4..c8ca921 100644 --- a/README.md +++ b/README.md @@ -186,13 +186,13 @@ var_dump ( ); ``` -#### Filesystem::getData +#### Filesystem::getDataByPath Return file content if path match storage item ``` var_dump ( - $filesystem->getData( + $filesystem->getDataByPath( '/full/path/to/page.txt' ) ); diff --git a/src/Dokuwiki/Filesystem.php b/src/Dokuwiki/Filesystem.php index 49c7d5b..c132624 100644 --- a/src/Dokuwiki/Filesystem.php +++ b/src/Dokuwiki/Filesystem.php @@ -187,7 +187,7 @@ class Filesystem return $path; } - public function getData(?string $path): ?string + public function getDataByPath(?string $path): ?string { if (in_array($path, $this->_list) && is_file($path) || is_readable($path)) { diff --git a/src/Dokuwiki/Helper.php b/src/Dokuwiki/Helper.php index 3c0b10c..232b10f 100644 --- a/src/Dokuwiki/Helper.php +++ b/src/Dokuwiki/Helper.php @@ -53,7 +53,7 @@ class Helper { $h1 = $this->_reader->getH1( $this->_reader->toGemini( - $this->_filesystem->getData( + $this->_filesystem->getDataByPath( $file ) ) @@ -65,7 +65,7 @@ class Helper { $h1 = $this->_reader->getH1( $this->_reader->toGemini( - $this->_filesystem->getData( + $this->_filesystem->getDataByPath( $file ) ) @@ -141,7 +141,7 @@ class Helper ), $this->_reader->getH1( $this->_reader->toGemini( - $this->_filesystem->getData( + $this->_filesystem->getDataByPath( $path ) )