writer extension
This commit is contained in:
@@ -19,10 +19,9 @@ class Writer
|
|||||||
return storage_path("lucent/build/" . ltrim($path, "/"));
|
return storage_path("lucent/build/" . ltrim($path, "/"));
|
||||||
}
|
}
|
||||||
|
|
||||||
public function save(string $path, string $html): void
|
public function save(string $path, string $html, string $extension = "html"): void
|
||||||
{
|
{
|
||||||
|
$filepath = $this->buildPath($path. "/index.$extension");
|
||||||
$filepath = $this->buildPath($path. "/index.html");
|
|
||||||
|
|
||||||
if (!file_exists(pathinfo($filepath, PATHINFO_DIRNAME))) {
|
if (!file_exists(pathinfo($filepath, PATHINFO_DIRNAME))) {
|
||||||
make_dir_r(pathinfo($filepath, PATHINFO_DIRNAME));
|
make_dir_r(pathinfo($filepath, PATHINFO_DIRNAME));
|
||||||
@@ -32,6 +31,7 @@ class Writer
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
public function recordIterator(callable $query, callable $parser, int $skip = 0, $limit = 100): int
|
public function recordIterator(callable $query, callable $parser, int $skip = 0, $limit = 100): int
|
||||||
{
|
{
|
||||||
// logger("fetching $skip");
|
// logger("fetching $skip");
|
||||||
|
|||||||
Reference in New Issue
Block a user