rename method

This commit is contained in:
ghost 2024-02-04 10:13:42 +02:00
parent 26d85269e8
commit 4d9ec32986
3 changed files with 6 additions and 6 deletions

View File

@ -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'
)
);

View File

@ -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))
{

View File

@ -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
)
)