Yii Framework Forum: [EXTENSION] Yii Kohana Bridge, use Kohana helpers in Yii! - Yii Framework Forum

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

[EXTENSION] Yii Kohana Bridge, use Kohana helpers in Yii! Rate Topic: -----

#1 User is offline   Fred Wu 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 27
  • Joined: 02-March 09
  • Location:Melbourne, Australia

Posted 06 March 2009 - 12:37 AM

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
0

#2 User is offline   qiang 

  • Yii Project Lead
  • Yii
  • Group: Yii Dev Team
  • Posts: 5,880
  • Joined: 04-October 08
  • Location:DC, USA

Posted 06 March 2009 - 07:09 AM

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. ;)
0

#3 User is offline   Fred Wu 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 27
  • Joined: 02-March 09
  • Location:Melbourne, Australia

Posted 06 March 2009 - 07:47 AM

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.
0

#4 User is offline   bithai 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 31
  • Joined: 23-February 09

Posted 07 March 2009 - 03:21 AM

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. 
0

#5 User is offline   Fred Wu 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 27
  • Joined: 02-March 09
  • Location:Melbourne, Australia

Posted 07 March 2009 - 07:45 AM

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

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users