They are all created from bbn\Mvc::get_model
function(bbn\Db $db, array $info, bbn\Mvc\Controller $ctrl, bbn\Mvc $mvc)
{
if (isset($info['path']) && $this->checkPath($info['path'])) {
if ($db) {
parent::__construct($db);
}
$this->cacheInit();
$this->_ctrl = $ctrl;
$this->_mvc = $mvc;
$this->inc = &$mvc->inc;
if (is_file($info['file'])) {
$this->_path = $info['path'];
$this->_file = $info['file'];
$this->_checkers = $info['checkers'] ?? [];
$this->_plugin_name = $info['plugin_name'] ?? null;
$this->_plugin = $info['plugin'] ?? null;
}
}
else{
$this->error("The model ". ($info['path'] ?? null) ." doesn't exist");
}
}