ModelGenerator in runtime?

Is it possible to create model and use it at run-time even if supposed model class method wasn’t generated,

in this case only standard functions(duhh).




$instance = MegaModelFactoryClass::fromTable('tablename')->findByPk(1);// generates model instance of Tablename;

$instance = MegaModelFactoryClass::fromTable('tablename');// in this case its new record;


$instance->columnname = $value;

$instance->save;