PHP class for Kohana framework: easier using database.