Clean-room copy of the reusable engines from comiida, with all instance data, secrets, dependencies, and build output excluded: - app/ Astro theme skeleton (no comiida blog posts; hero image -> placeholder) - api/ SeedProject PHP framework (no vendor/.env/config.php) - content-pipeline/ engine only (scripts/admin/prompts; empty runtime state) - astroagent.config.json + app/.astroagent/skills Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01SYHWLHihq3v9nxNwoPCKSn
31 lines
No EOL
1.1 KiB
PHP
31 lines
No EOL
1.1 KiB
PHP
<?php
|
|
|
|
/** Reference */
|
|
/**
|
|
* // Match all request URIs
|
|
[i] // Match an integer
|
|
[i:id] // Match an integer as 'id'
|
|
[a:action] // Match alphanumeric characters as 'action'
|
|
[h:key] // Match hexadecimal characters as 'key'
|
|
[:action] // Match anything up to the next / or end of the URI as 'action'
|
|
[create|edit:action] // Match either 'create' or 'edit' as 'action'
|
|
[*] // Catch all (lazy, stops at the next trailing slash)
|
|
[*:trailing] // Catch all as 'trailing' (lazy)
|
|
[**:trailing] // Catch all (possessive - will match the rest of the URI)
|
|
.[:format]? // Match an optional parameter 'format' - a / or . before the block is also optional
|
|
*/
|
|
|
|
class Router {
|
|
public static function Routing() {
|
|
$router = new AltoRouter();
|
|
$router->setBasePath('');
|
|
|
|
// Rules Set Here
|
|
// $router->map('GET|POST', '/orgs/[*:orgid]', array('c' => 'orgs', 'a' => 'index'));
|
|
|
|
PluginManager::boot($router);
|
|
|
|
return $router->match();
|
|
|
|
}
|
|
} |