Browse Source

rename method

main
ghost 10 months ago
parent
commit
4d9ec32986
  1. 4
      README.md
  2. 2
      src/Dokuwiki/Filesystem.php
  3. 6
      src/Dokuwiki/Helper.php

4
README.md

@ -186,13 +186,13 @@ var_dump ( @@ -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'
)
);

2
src/Dokuwiki/Filesystem.php

@ -187,7 +187,7 @@ class Filesystem @@ -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))
{

6
src/Dokuwiki/Helper.php

@ -53,7 +53,7 @@ class Helper @@ -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 @@ -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 @@ -141,7 +141,7 @@ class Helper
),
$this->_reader->getH1(
$this->_reader->toGemini(
$this->_filesystem->getData(
$this->_filesystem->getDataByPath(
$path
)
)

Loading…
Cancel
Save