diff --git a/docs/architecture-concepts/the-hydekernel.md b/docs/architecture-concepts/the-hydekernel.md index c9c9bf2577a..9f470ed3835 100644 --- a/docs/architecture-concepts/the-hydekernel.md +++ b/docs/architecture-concepts/the-hydekernel.md @@ -53,10 +53,12 @@ You can read all about it in the [Autodiscovery Documentation](autodiscovery). Since the most common way to interact with the kernel is through the Hyde facade, we will use that for the examples. But you could just as well chain the methods on the accessed kernel singleton instance if you wanted. + +
- + #### `version()` @@ -87,7 +89,7 @@ Hyde::features(): Hyde\Facades\Features No description provided. ```php -Hyde::hasFeature(string $feature): bool +Hyde::hasFeature(Hyde\Enums\Feature|string $feature): bool ``` #### `toArray()` @@ -105,14 +107,14 @@ Hyde::toArray(): array
- + #### `files()` No description provided. ```php -Hyde::files(): \Hyde\Foundation\Kernel\FileCollection +Hyde::files(): Hyde\Foundation\Kernel\FileCollection ``` #### `pages()` @@ -120,7 +122,7 @@ Hyde::files(): \Hyde\Foundation\Kernel\FileCollection +Hyde::pages(): Hyde\Foundation\Kernel\PageCollection ``` #### `routes()` @@ -128,7 +130,7 @@ Hyde::pages(): \Hyde\Foundation\Kernel\PageCollection +Hyde::routes(): Hyde\Foundation\Kernel\RouteCollection ``` @@ -187,7 +189,7 @@ Hyde::markdown(string $text, bool $normalizeIndentation): Illuminate\Support\Htm + + diff --git a/monorepo/scripts/docs/DocGen.php b/monorepo/scripts/docs/DocGen.php index 6260fe52e95..dc8f09410a4 100644 --- a/monorepo/scripts/docs/DocGen.php +++ b/monorepo/scripts/docs/DocGen.php @@ -152,6 +152,45 @@ generate($options); } +// Update the HydeKernel page +(function (): void { + echo "\n\033[33mUpdating the HydeKernel page...\033[0m"; + + $pages = [ + 'hyde-kernel-base-methods', + 'hyde-kernel-foundation-methods', + 'hyde-kernel-string-methods', + 'hyde-kernel-hyperlink-methods', + 'hyde-kernel-filesystem-methods', + 'hyde-kernel-kernel-methods', + 'hyde-kernel-extensions-methods', + 'hyde-kernel-view-methods', + 'hyde-kernel-boot-methods', + ]; + + $page = 'docs/architecture-concepts/the-hydekernel.md'; + + // Replace everything between and + // With the concatenated content of the partials + + $startMarker = ''; + $endMarker = ''; + + $rootPath = realpath(__DIR__.'/../../../'); + + $content = ''; + foreach ($pages as $partial) { + $content .= trim(file_get_contents($rootPath.'/docs/_data/partials/hyde-pages-api/'.$partial.'.md'))."\n\n"; + } + + $file = file_get_contents($page); + $file = preg_replace('/.*/s', $startMarker."\n\n".$content.$endMarker, $file); + + file_put_contents($page, $file); + + echo " \033[37mDone!\033[0m\n"; +})(); + // Assemble end time in milliseconds $timeEnd = microtime(true); $time = number_format(($timeEnd - $timeStart) * 1000, 2);