Questions tagged [kohana]

HMVC PHP5 framework that provides a set of components for building web applications. Be sure to mention specific version when asking.

Due to the differences in the codebase between and , as well as each minor version, please be specific in detailing which version of Kohana you are using when asking your question.

Kohana is an elegant framework that provides a rich set of components for building web applications.

It requires very little configuration, fully supports and , and provides many of the tools that a developer needs within a highly flexible system. The integrated class auto-loading, cascading filesystem, highly consistent , and easy integration with vendor libraries make it viable for any project, large or small. The support of has been started with

Popular Questions

Resources

See also

2221 questions
4
votes
1 answer

Kohana URLs including index on redirects and pagination

I am having an issue with the KO3 core inserting index.php into my URL's when I use redirect Request::instance()->redirect('something'); or $paginationStuffHere->render(). The result of either of these is…
david
  • 726
  • 1
  • 5
  • 10
4
votes
1 answer

Kohana Database Query Builder custom sort order ("ORDER BY Field (id, 1, 3, 2)" in MySQL)

I have a set of id's to select, so I request: $ids = array( 1, 2, 3, 4, 5 ); $q = DB::select('field1', 'field2', 'field3')-> from('work')-> where('field1', 'in', $ids)->execute(); How can I sort them in my custom order, like MySQL's…
1allen
  • 43
  • 1
  • 7
4
votes
1 answer

Kohana v3.1.0 ORM _ignored_columns -- now that it's gone, what should I do instead?

It seems that in v3.1.0 of Kohana's ORM that the _ignored_columns property has been removed. What the is the recommended technique to dealing with fields that aren't in the databases? The case I have right now is password_confirm where password is a…
Darryl Hein
  • 142,451
  • 95
  • 218
  • 261
4
votes
3 answers

$_GET array is empty

My Kohana 3 application makes use of a fair bit of $_GET parameters. However when I deployed the application I got a blank page with just the text "No input file specified". I quickly found the solution to this seemingly common problem by changing…
Jordan
  • 2,281
  • 1
  • 17
  • 24
4
votes
1 answer

Kohana ORM custom methods in models

I have these two models: class Model_user extends ORM { protected $_has_many = array('credits', array('model'=>'credit', 'foreign_key'=>'user')); } class Model_credit extends ORM { protected $_belongs_to = array('user',…
sir.otasek
  • 41
  • 1
  • 3
4
votes
2 answers

What are the consequences of not naming PHPUnit test methods with camel case?

I'm writing unit tests with PHPUnit. I now have about 100 methods written. Since these are for a Kohana framework application, I used its naming convention for the test methods as well, e.g.: function test_instance() { ... } function…
Edward Tanguay
  • 189,012
  • 314
  • 712
  • 1,047
4
votes
1 answer

Kohana 3 ORM: advanced queries, efficiency

So we all know that the documentation for Kohana 3 is absolutely horrible. So how can I construct the following query, where I have a "Player" and "Dragon" model? SELECT * FROM `dragons` JOIN `players` ON (`dragons`.`player_id` =…
Tesserex
  • 17,166
  • 5
  • 66
  • 106
4
votes
2 answers

Decreasing queries in MySQL with many one-to-many relationships (ORM)

I'm currently designing an application using PHP and MySQL, built on the Kohana framework. I'm making use of the built in ORM and it has proved to be extremely useful. Everything works fine, but I'm very concerned with the number of queries being…
aaronofleonard
  • 2,546
  • 17
  • 23
4
votes
2 answers

How to remove duplicate rows have the same id in Join Query?

I using Kohana - a framework base on PHP to make a search function to search all name in two table, and it doesn't duplicate. Two table have struct like this: content - content_revision id - id title - …
Ave
  • 4,338
  • 4
  • 40
  • 67
4
votes
1 answer

Sorting by foreign table value with Kohana ORM

Is there any way to sort (or order by) in ORM by using a value from a foreign table? Can you do something like the following: ORM::factory("table")->order_by("table.foregin_table.column" , "ASC") Or do you have to use some regular MySQL and join…
Navetz
  • 393
  • 1
  • 2
  • 12
4
votes
3 answers

i18n and Error messages in Kohana 3

I am developping an administration application with Kohana 3 and I'm obviously working with a lot of forms. The application needs to be multilangual and I'm very confused about how to manage my messages files and especially how to access them. Does…
LBridge
  • 2,135
  • 5
  • 21
  • 32
4
votes
1 answer

Kohana ORM relationships question

I have tables: users {id, name} projects {id, name} roles {id, name} projects_users {id, user_id, project_id, role_id} I have models: project { has many users through projects_users } user { has many projects through projects_users…
Bob0101
  • 187
  • 2
  • 14
4
votes
1 answer

Facebook error "Missing redirect_uri parameter."

Kohana_Exception [ 0 ]: Error fetching remote https://graph.facebook.com/oauth/access_token? client_id=& client_secret=& code=& …
Sammiboi
  • 51
  • 1
  • 1
  • 3
4
votes
2 answers

Kohana param() don't work

I'm using Kohana 3. Does anyone knows why param('controller') result is NULL. Routing: Route::set('default', '((/(/)))') ->defaults(array( 'controller' => 'page', 'action' => 'index', )); URL:…
Bob0101
  • 187
  • 2
  • 14
4
votes
1 answer

Sending large amount of POST data, in xampp ok, in plesk not ok

I have developed a project with KOHANA Framework and a form send a large amount of data via POST. The problem is that in my local environment (XAMPP) I see all my data, when I type print_r($_POST), but in live environment (Plesk) I don't see all. I…