News for the ‘Kohana’ Category

Kohana 3.1 will be the last PHP 5.2+ release

So, the hot news are that Kohana 3.1, due by the end of the year, will be the last release for PHP 5.2.x. The next release, Kohana 3.2 will be support only PHP 5.3+. This is great news for people that already enjoying the benefits of PHP 5.3 which are major: Namespaces, lambda (anonymous) functions, and more…

One of the hot new features in Kohana 3.1 is Lambda routes. For example:

<?php
Route::set('testing', function($uri)
	{
		if ($uri == 'foo/bar')
			return array(
				'controller' => 'welcome',
				'action'     => 'foobar',
			);
	}
);

Route::set('testing', function($uri)
	{
		if ($uri == '</language regex/>(.+)')
		{
			Cookie::set('language', $match[1]);
			return array(
				'controller' => 'welcome',
				'action'     => 'foobar'
			);
		}
	}
);

https://gist.github.com/7b2db1abbf22b4cd74b2

Current Kohana 3.1 release notes: (may change)

  • Scratchpad, eventual general overview for 3.1 changes.
  • Rewritten request class
  • Added response classLambda routes
  • Added http_* classes, for responses (like 404s)
Posted: December 20th, 2010
Categories: Kohana, PHP
Tags:
Comments: No Comments.