P
P
pantsarny2015-05-13 12:10:11
Yii
pantsarny, 2015-05-13 12:10:11

Yii - how to replace root classes?

Good afternoon, colleagues! I am developing a project on Yii1, and I saw a lot of interesting goodies in the Yii2 code that I wanted to have in my project. For example, the static className method from the Object class, which I want to add to the Component class accordingly, the load, formName methods from the Model, and some others. There was a question about substitution of root classes. I want all my classes to chain-inherit from Component instead of CComponent, I'm thinking about using a trait so I don't have to rewrite a lot of code. This is the right decision?

Answer the question

In order to leave comments, you need to log in

3 answer(s)
A
Alexander Makarov, 2015-05-13
@pantsarny

www.yiiframework.com/doc/guide/1.1/en/basics.names... , see Using the class table.
www.yiiframework.com/forum/index.php/topic/28979-h...

M
Maxim Grechushnikov, 2015-05-13
@maxyc_webber

time to upgrade)

H
He11ion, 2015-05-13
@He11ion

www.yiiframework.com/doc-2.0/guide-intro-upgrade-f...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question