To be honest rails is a framework for Ruby, if you want to write in
PHP use Cake or PHPonTrax or some php MVC framework.
If that is what you mean when you say instance classes from Rails? If
that's not what you mean, sorry but you may need to explain a little