<section id="in-memory-page-methods">

<!-- Start generated docs for Hyde\Pages\InMemoryPage -->
<!-- Generated by HydePHP DocGen script at 2026-08-08 23:08:21 in 0.24ms -->

#### `make()`

Static alias for the constructor.

```php
/** @param string|(Closure(): string)|(Closure(static): string)|null $contents */
InMemoryPage::make(string|(Closure(): string)|(Closure(static):, Hyde\Markdown\Models\FrontMatter|array $matter, Closure|string|null $contents, string $view): static
```

#### `outputPath()`

Qualify a page identifier into a target output file path.

The configured output directory is applied to all identifiers. Identifiers with a file extension retain it, while identifiers without one get the configured output extension (`.html` by default).

```php
InMemoryPage::outputPath(string $identifier): string
```

#### `__construct()`

Create a new in-memory (virtual) page instance.

Pass literal contents or a closure to `$contents`, or pass a registered Laravel view key or Blade file path to `$view`.

Contents and views cannot be used together. Omit both to create an empty page. An empty view value is treated as no view.

View values ending in `.blade.php` are treated as Blade file paths. Other values are treated as registered Laravel view keys.

```php
/** @param string|(Closure(): string)|(Closure(static): string)|null $contents */
$page = new InMemoryPage(string $identifier, FrontMatter|array $matter, string|(Closure(): string)|(Closure(static):, string|null $view): void
```

- **Throws:** InvalidArgumentException If both contents and a view are supplied.

#### `getContents()`

Get the literal contents or invoke the configured content closure.

```php
$page->getContents(): string
```

#### `getBladeView()`

Get the Blade view key or file path, or an empty string when none is configured.

```php
$page->getBladeView(): string
```

#### `compile()`

Get the contents that will be saved to disk for this page.

```php
$page->compile(): string
```

<!-- End generated docs for Hyde\Pages\InMemoryPage -->

</section>
