"import" Property In Cwebapplication

Hi, i have one question…

there are no import property in CWebApplication , but in protected/config/main.php the import used in array. is import member of CWebApplication? I can’t found it in CWebApplication.

It inherits setImport() from CModule.

I think import is defined in YiiBase class if you pay attention file/config loaded from main.php get sent to the WebApplication

but in top of protected/config/main.php file, this statement is written:


// This is the main Web application configuration. Any writable

// CWebApplication properties can be configured here.

the setImport() is a method not a property!

Properties often don’t exist as attributes. Yii uses magic methods to create them from properly formatted getters and setters.

Read me.

If only a setter is created, you essentially have a write-only property.

Thanks for your help but I still don’t understand :(. The comment in top of main.php say : “…Any writable CWebApplication properties can be configured here”.

It is a writable property, inherited from CModule. That’s why there is a set method.

It seems that I should read about magic methods and setters/getters in PHP and Yii. Thank you very mush Keith:).

oh I thought you talking about the method Yii::import misunderstood yea that import in config file is dynamic property