Is it possible to somehow run the "model" and "crud" command line statements from within Yii?
Is this something that can be done by accessing or extending Gii? I haven’t had the time to dig into Gii yet so please excuse me if it is blatantly obvious there.
I have some scenarios where I want to be able to dynamically expand my application based on a preset definition. So all the information that the model and crud commands need would already be available, I just need to run the commands. I’ve tried using exec, however because the yiic shell is interactive I couldn’t figure out how to format the commands so that the shell actually got the command.
Gii I know is a replacement for the command line, however it is also an interactive webpage.
What I’m looking for is something more like (overly simplified and hopeful ):
Yii::app()->createModel(‘name’);
It must exist somewhere in the Gii code, I just thought I’d ask before digging through lots of code.