S
S
Sergey Zolotarev2018-08-07 13:42:26
Yii
Sergey Zolotarev, 2018-08-07 13:42:26

Am I connecting my component in Yii Framework correctly?

Hello!
Now I'm learning to make a website on PHP+Yii Framework 1.1.15. I recently made my own Site.php component file and saved it to /protected/components/. In the Site class I used a descendant of CComponent and in main.php I made the connection like this:

'site'=>array(
          'class'=>'application.components.Site',
          'sitepage'=>new CController()->route;
)

I want to know from you, is this the correct code or not?
Thank you in advance!

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question