I found it Yii documentation is extremaly unfriendly to newbie users.
Guess why! - Here you are example:
Have a look at ‘CCaptcha’ class docs:
http:||www.yiiframework.com/doc/api/1.1/CCaptcha
and now tell me please how should I know the right usage pattern is like this one for instance:
$this->widget("CCaptcha", array('buttonLabel'=>'Change one for me', 'buttonOptions'=>array('style'=>'margin-bottom:20px;')));
This is the fundamental problem with starting work with Yii - you never know how to use the class api as there is no information provided concerning its proper implementation:
-
where put class files
-
how to initialize and object or interface
-
how dependency injection is organized in Yii and how to access objects in global scope
This is the outcome of my fruitless attempts to get CViewAction->basePath from controler. Hell knows how to access CViewAction object - what is right syntax for that - documentation is pointless here.
Any comments on the subject, please?