Questions tagged [kohana-3]

Kohana 3 is a HMVC (Hierarchical Model-View-Controller) PHP framework that places security, scalability and rapid development at its forefront.

Kohana is an HMVC (Hierarchical Model-View-Controller) PHP5 framework that provides a set of components for building web applications.

Kohana 3 is the first version of Kohana that supports HMVC.


Useful links


Related tags

846 questions
0
votes
1 answer

Getting Kohana session variable in external file

I have a kohana installation, version 3.x, and I'm already using 'native' driver. I want set a $_SESSION variable in kohana controllers, and be able to use this in an external.php file, that is outside the kohana installation. How can I do this…
0
votes
3 answers

Deleting child entry with 'has_many' relationship, 1:many relationship

Based on http://kohanaframework.org/3.2/guide/orm/relationships Let's say I have 2 Models; with 1 User : Many Posts relationship. How would I delete all posts of a selected user? Model_User protected $_has_many = array('posts' =>…
ephemeron
  • 396
  • 2
  • 12
0
votes
2 answers

Bypassing method()/function() code upon ACL check failure. Without using IF statement, or return;

I'm using Kohana 3.2 with Controller_Template. Basically what I would like to do is to check the ACL of each action_method. If fail, load the access denied view and skip the rest of the action_method code; else continue loading. I know I could use…
ephemeron
  • 396
  • 2
  • 12
0
votes
1 answer

Kohana 3 routing not working properly when in the format controller/action

I am new to Kohana. I am using the default route in Kohana 3.2 which is Route::set('default', '((/(/)))') ->defaults(array( 'controller' => 'admin', 'action' => 'login', )); My controller is as follows :
ajaybc
  • 4,049
  • 7
  • 44
  • 57
0
votes
2 answers

Why do i need to use Kohana Form helper functions?

I am using Kohana 3.2 on a project that I am working on. I am new to this framework. While searching for the documentation for validation I found this page : http://kohanaframework.org/3.1/guide/kohana/security/validation In that page they are using…
ajaybc
  • 4,049
  • 7
  • 44
  • 57
0
votes
1 answer

Proper way to handle pivot data operations (via has_many "through")

In a basic blog application, I have an articles module which allows me to select the related categories. There are 3 tables; articles, article_categories, categories. 2 models, Model_Article and Model_Category extending ORM with has-many 'through'…
ephemeron
  • 396
  • 2
  • 12
0
votes
1 answer

Kohana 3.2 - How do you send variables whith your routing?

I have the following route set at the end of the route list for my site which allows a final check on the uri value to provide my site users with a vanity URL (http://example.com/username) Route::set('profile', '/()', array( …
Andrew Willis
  • 2,289
  • 3
  • 26
  • 53
0
votes
2 answers

Kohana 3 : $_GET shows URI route (controller/method) instead of the $_GET params

Im in /order/test When I try to /order/test?lala=test&baba=test public function action_test(){ echo var_dump($_GET); } It should output lala=test&baba=test in the var_dump(), but instead it gives me: array(1) { ["order/test"]=> string(0) "" } Why…
Karem
  • 17,615
  • 72
  • 178
  • 278
0
votes
1 answer

kohana orm join duplicate objects result

I'm trying to query the country table with the below query to print all countries with the corresponding cities. Now i'm getting a duplicated country object for each city instead of have one country object for all cities. $all =…
Abbas
  • 97
  • 1
  • 11
0
votes
1 answer

Kohana 3.2 ORM with columns based on DB::expr()

In my current app, I have a list of plays and it is almost universally sorted by the play's name in queries. Currently, it is built simply using DB::select() statements, but while we're doing a lot of refactoring, we want to begin using Kohana's…
monksp
  • 929
  • 6
  • 14
0
votes
1 answer

Kohana Authlite - not allow two users logged in ith the same credentials the same session

i am using authlite authentication module for my kohana 3 website. Now it is possible for two users to login using the same credentials, in the same session. i don't want this to happen for security reasons. is there any possibility for me to avoid…
dana
  • 5,168
  • 20
  • 75
  • 116
-1
votes
1 answer

KOHANA Themes - how to set theme in K3

dudes. I hope this question is not a repost. I'm newbie on Kohana. I'm working in a system made by other guy. I need to understand how to set the theme but I can't find anything here nor google. I found that in some systems is set a cookie called…
JuanMatias
  • 87
  • 1
  • 1
  • 10
-1
votes
1 answer

Forms with Kohana 3.2 and Smarty

Good day! I'm learning Kohana (3.2) with Smarty (MrAnchovy-Kohana_Smarty). I created a simple form with one field which is validated after submission. I'd like the field to be repopulated with the submitted value when the validation fails. How can I…
Vojtech
  • 2,533
  • 9
  • 34
  • 65
-1
votes
1 answer

turn off/exclude routes in Kohana, for example my gallery/ dir

Im trying to access galleries/2/image.jpg, but Kohana thinks its a route so it return an error "Unable to find URI route galleries" So how can i turn off for specific directory/route names, so i can access the images?
Karem
  • 17,615
  • 72
  • 178
  • 278
-1
votes
1 answer

Making the Kohana ORM result object suitable for the RSS helper

How do I make a returned ORM result object in Kohana suitable for use in the items parameter of the RSS feed helper? For example, if want to add all of my user posts to the feed. $posts = ORM::factory('posts')->find_all(); The items parameter used…
user1019144
  • 1,203
  • 2
  • 14
  • 19