Extending Yii

Hi All,

I am wanting to know if there is a way that i can extend yii with a private library, that will not be available to through composer packagist? I am wanting to build a little library that i can use within my controllers which will act as a bridge to another system and return usable data which i can then interact with in my yii controller.

Also is there a way that i can use an array or json to populate a data grid as opposed to passing it an ActiveDataProvider?

Many Thanks


  1. you can set an alias to any namespace by yourself. See Yii::setAlias

And have a look here too.

Yes, just use the array one. See the Guide on that!

Note there is unfinished part of creating your own provider so here someone from Yii core team can answer authoritatively. But looking at ArrayDataProvider, you need to inherit from Object and Implement DataProviderInterface and you are done!