Favourite Kohana Tips & Features? [closed]

Generating Form::select() options from database result Kohana 3.1 and 3.0 $options = ORM::factory(‘model’) ->order_by(‘title’,’ASC’) ->find_all() ->as_array(‘id’,’title’); $select = Form::select(‘name’, $options); It should be noted this is not restricted to the ORM and can be used on all database results (they all support as_array). See the database results information for more details. If you want to … Read more

PHP: What does __(‘Some text’) do?

In Kohana (version 3) the function is defined in system/base.php and is a convenience function to aid (as the other answers have mentioned) internationalization. You provide a string (with, optionally, some placeholders to substitute values into the finished text) which is then interpreted and, if required, a translation is returned. Contrary to assumptions in other … Read more