Can I use Yii's Activerecord (model) classes without Yii? It looks like it have lots of dependencies. I want to use ORM and Validation mechanism of Yii in my own project.
Yii's ActiveRecord Classes have lots of dependent classes, hence you'll not be able to use only those classes. For every error you get you end up including all the dependent classes.
If you want to use the ORM for your project, then why don't you use some of the best ORMs available for PHP? And moreover you'll be 100% sure that nothing is broken.
Some of the PHP ORMs that you can use are:
For more information, look at some of the following SO Questions:
Hope this helps.
I will say better if you don't and write something your own by taking the idea from Yii or best will be use Yii itself, because CActiverecord
is core part of Yii extending CModel
and CComponent
if you try to extract it from Yii you will find in the end that you copied almost everything.
your question seems to be impossible to answer. You can't extract a PHP class from Yii without use the whole framework. Frameworks like Symphony, offers to you some components that you can use and don't need to use whole framework. There are a project ORM on PHP, I have never used it, but you can do a experience... http://www.phpactiverecord.org/ I hope it helps you, hugs.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With