got a little problem. I want to optimize my code and not to repeat it for some functionality.
I want to use PHP's reflection-abilities with a model.
In a model I wanna call another model, so I do the following: ... $record = new Names(); $record->title = $author; ...
Now I change it to: ... $class = 'Names'; $record = new $class(); $record->title = $author; ...
Now error occures: Class 'Names' not found.
Using PHP 5.4, Phalcon 1.3.
What's the way getting it working? Cannot figure it :/
Thanks alot and very much for your time.