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
29 lines
No EOL
677 B
PHP
29 lines
No EOL
677 B
PHP
<?php
|
|
|
|
class Controller {
|
|
|
|
function __construct() {
|
|
$this->view = new View();
|
|
$this->view->_c = $this;
|
|
}
|
|
|
|
/**
|
|
*
|
|
* @param string $name Name of the model
|
|
* @param string $path Location of the models
|
|
*/
|
|
public function loadModel($name, $modelPath = 'models/') {
|
|
|
|
$path = $modelPath . $name.'_model.php';
|
|
|
|
if (file_exists($path)) {
|
|
require $modelPath .$name.'_model.php';
|
|
|
|
$modelName = $name . '_Model';
|
|
$this->model = new $modelName();
|
|
$this->view->_m = $this->model; // extends [model] access to views
|
|
|
|
}
|
|
}
|
|
|
|
} |