mirror of
https://github.com/YGGverse/gemini-php.git
synced 2026-03-31 17:05:29 +00:00
rename method
This commit is contained in:
parent
26d85269e8
commit
4d9ec32986
3 changed files with 6 additions and 6 deletions
|
|
@ -186,13 +186,13 @@ var_dump (
|
||||||
);
|
);
|
||||||
```
|
```
|
||||||
|
|
||||||
#### Filesystem::getData
|
#### Filesystem::getDataByPath
|
||||||
|
|
||||||
Return file content if path match storage item
|
Return file content if path match storage item
|
||||||
|
|
||||||
```
|
```
|
||||||
var_dump (
|
var_dump (
|
||||||
$filesystem->getData(
|
$filesystem->getDataByPath(
|
||||||
'/full/path/to/page.txt'
|
'/full/path/to/page.txt'
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|
|
||||||
|
|
@ -187,7 +187,7 @@ class Filesystem
|
||||||
return $path;
|
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))
|
if (in_array($path, $this->_list) && is_file($path) || is_readable($path))
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -53,7 +53,7 @@ class Helper
|
||||||
{
|
{
|
||||||
$h1 = $this->_reader->getH1(
|
$h1 = $this->_reader->getH1(
|
||||||
$this->_reader->toGemini(
|
$this->_reader->toGemini(
|
||||||
$this->_filesystem->getData(
|
$this->_filesystem->getDataByPath(
|
||||||
$file
|
$file
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
|
@ -65,7 +65,7 @@ class Helper
|
||||||
{
|
{
|
||||||
$h1 = $this->_reader->getH1(
|
$h1 = $this->_reader->getH1(
|
||||||
$this->_reader->toGemini(
|
$this->_reader->toGemini(
|
||||||
$this->_filesystem->getData(
|
$this->_filesystem->getDataByPath(
|
||||||
$file
|
$file
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
|
@ -141,7 +141,7 @@ class Helper
|
||||||
),
|
),
|
||||||
$this->_reader->getH1(
|
$this->_reader->getH1(
|
||||||
$this->_reader->toGemini(
|
$this->_reader->toGemini(
|
||||||
$this->_filesystem->getData(
|
$this->_filesystem->getDataByPath(
|
||||||
$path
|
$path
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue