Phase 14b-1: Frontend skeleton on iManager 2.0 container#19
Merged
Conversation
Public site renders from the migrated SQLite DB through a brand-new,
container-driven render path. Default-theme files (default.php,
template.php, _head/_header/_footer.php) keep working as adapter
templates — only one $site->version substitution in _footer.php.
New PSR-4 namespace `Scriptor\Boot\Frontend\`:
- Page — readonly DTO around `Imanager\Domain\Item`; surfaces
slug/template/parent/content/menu_title/images plus
any other field via __get against the FieldValueBag.
- PageRepository
— wrapper over CategoryRepository + ItemRepository for
the Pages category; find/findBySlug/findHome/
findByParent/findActiveByParent built on the iManager
Query AST.
- Sanitizer — facade over `Imanager\Validation\Sanitizer` adding
the legacy-only `templateName()` and `pageName()`
helpers themes still call.
- Site — minimal renderer: resolves the requested slug from
`$_SERVER['REQUEST_URI']`, exposes the legacy `$site`
surface (siteUrl, themeUrl, config, version, page,
sanitizer, render(), cache(), throw404(), getTCP()
stub with sane defaults). The render() switch returns
'' for theme-overridable hooks (hero, mainNavItems,
footerNav, …) so the default render path doesn't
crash before BasicTheme reattaches in 14b-2.
boot.php now loads vendor/autoload + container + the legacy
scriptor-config.php (with IS_IM/IM_DATAPATH defines so the legacy file
header doesn't die()). The 1.x `imanager/` library and
`editor/core/scriptor.php` stay disabled — same Imanager\ namespace
clash as 14a.
index.php constructs Frontend\Site directly and includes the theme
template. The basic-theme `_ext.php` (BasicRouter / SuperCache /
BasicTheme) is intentionally NOT loaded here — comes back in 14b-2.
Manual smoke (PHP built-in server):
GET / → 200, 5.3 KB, <h1>Scriptor's Demo Page</h1>
GET /scriptors-demo-page → 200, identical (home slug)
GET /this-does-not-exist → 404, sane fallback
Markdown content rendered via Sanitizer::markdown() (Parsedown +
HTMLPurifier when enabled).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Public Scriptor site renders from the migrated SQLite DB through a brand-new,
container-driven render path. Default-theme files (default.php, template.php,
_head/_header/_footer.php) keep working as adapter templates — only one
$site->version substitution in _footer.php.
New PSR-4 namespace
Scriptor\Boot\Frontend\:Imanager\Domain\Itemon the iManager Query AST
Imanager\Validation\Sanitizeradding thelegacy-only
templateName()andpageName()helpers themes still calllegacy
$sitesurface (siteUrl, themeUrl, config, version, page, sanitizer,render(), cache(), throw404(), getTCP()-stub). The render() switch returns ''
for theme-overridable hooks (hero, mainNavItems, footerNav, …) so the
default render path doesn't crash before BasicTheme reattaches in 14b-2.
boot.phploads vendor/autoload + container + the legacy scriptor-config.php(with IS_IM/IM_DATAPATH defines so the legacy file header doesn't die()).
index.phpconstructs Frontend\Site directly. The basic-theme_ext.php(BasicRouter / SuperCache / BasicTheme) is intentionally NOT loaded — comes
back in 14b-2.
Test plan
GET /→ 200, 5.3 KB,<h1>Scriptor's Demo Page</h1>, markdown contentGET /scriptors-demo-page→ 200, identical (home slug)GET /this-does-not-exist→ 404, sane fallback