[EXTENSION] Yii Kohana Bridge, use Kohana helpers in Yii!

http://www.beyondcod…helpers-in-yii/

Kohana has some very useful helpers. So let’s try to make them work in Yii as well. :)

I am new to Yii, so please let me know if there’s a better way of doing this. :)

Cheers

This is very nice!

Can it work with a complete Kohana installation? If so, maybe we should put the Kohana installation under protected/vendors directory, and move your bridge class to protected/extensions/kohana/Kohana.php ?

Anyway, excellent work! You should post it to our extension system as well. ;)

Thanks Qiang, I will post it to the extension system after a bit more testing and improvement. :)

I think in theory we should be able to include the complete Kohana installation, but it probably wouldn't make much sense because of the overhead. Helpers are useful and don't require the Kohana core, hence the minimal overhead.

I'll probably look into bridging the Kohana configuration class as well (and extract it out of the Kohana core), since it is very flexible and could be useful for larger scale applications.

I was thinking of doing something similiar with CodeIgnitor helpers =). 

There is an issue though, some of the CI / Kohana helpers refers to some other Library files, so not all helpers will work as is. 

For example, Kohana's  xss_clean and CI's xss_clean helper calls the Library version, which does not exist in the helpers standalone. 

You’re right tthai1980, and I’m planning to port or extract those methods across. :)