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

View file

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

View file

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