Browse Source

rename method

main
ghost 9 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 (
); );
``` ```
#### 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'
) )
); );

2
src/Dokuwiki/Filesystem.php

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

6
src/Dokuwiki/Helper.php

@ -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…
Cancel
Save