Cdbauthmanager Api Method - Page 167

I have been reading this book and is beneficial.

Some of the things I have not yet grasped , but may be because I am a newbie and no fault of the author :slight_smile:

On Page 167 , there is a line :

$role->addChild(‘createProject’);

Is "addChild" a typo or am I missing something? . Because CDbAuthManager details page (http://www.yiiframework.com/doc/api/1.1/CDbAuthManager#addItemChild-detail) does not lists this method.

Thanks!


$role

is a reference to an instance of the authorization item, not the manager:

http://www.yiiframework.com/doc/api/1.1/CAuthItem#addChild-detail

Thanks for the clarification, it helped.Still learning… :slight_smile: