Love Fuel?
Donate
About
Forums
Discussions
Login
FuelPHP Forums
Ask your question about FuelPHP in the appropriate forum, or help others by answering their questions.
WanWizard
a.k.a. WanWizard
Discussions
4
Comments
8243
Activity
Clarification
The only method you HAVE to implement in your driver extension are the ones defined as abstract in the login driver. To know which are extra, compare the API of the driver with that of simpleauth. All methods not present in the driver are unique to…
Comment by
WanWizard
December 2011
permalink
Updating Many-to-Many relationships
Yeah, sorry, unset() is a language construct, and doesn't work like that. You basically need two loops. One like this, that deletes all relations for genres that are not selected, and one that adds genres that where selected, but are not relat…
Comment by
WanWizard
December 2011
permalink
2 unexplained properties of ORM relations
Harro Verton wrote on Friday 23rd of December 2011: No. The key fields in the relationship definition are used to generate the SQL for the joins, so they are required. Oops, sorry, I thought you referred to the 'key' fields in the de…
Comment by
WanWizard
December 2011
permalink
Updating Many-to-Many relationships
This should be enough to delete them: // unlinked all related genres not present in $genres foreach ($show->genres as $key => $unused) { in_array($key, $genres) or unset($show->genres[$key]); } $show->save();
Comment by
WanWizard
December 2011
permalink
2 unexplained properties of ORM relations
No. The key fields in the relationship definition are used to generate the SQL for the joins, so they are required.
Comment by
WanWizard
December 2011
permalink
Updating Many-to-Many relationships
Cascade_save disabled on that relation? If so, $show->save() will only save the show object, and not the changes to the related objects.
Comment by
WanWizard
December 2011
permalink
Updating Many-to-Many relationships
Moved the post to the ORM forum. Without telling us what the errors are, or what issues you have, we can only guess. In case of update, are some related objects already present? Shouldn't you check if $show->genres[$genre] exists before add…
Comment by
WanWizard
December 2011
permalink
2 unexplained properties of ORM relations
cascade_save: if true, when saving the object, it also saves updated related objects cascade_delete: if true, delete related objects when deleting the object itself
Comment by
WanWizard
December 2011
permalink
Looping through large db result sets to avoid filling memory
Please add a feature request for this at http://github.com/fuel/core/issues. We're going to redesign the database functionality for the next version, we can see if this will fit in.
Comment by
WanWizard
December 2011
permalink
How to learn Fuelphp routing
We'll have a look at why it doesn't work. Probably the way the name is detected.
Comment by
WanWizard
December 2011
permalink
Where to place random classes / libraries
If you put it in a folder of app/classes, remember that the class name has to reflect that.
Comment by
WanWizard
December 2011
permalink
Rest Controller and Response 1.1
Yes, but not as a view like a normal controller would. With the rest controller, you make sure format detection detects 'html' as the desired return format (see the docs on how to do that), or set $this->format to 'html', and…
Comment by
WanWizard
December 2011
permalink
Routing don't work well when using named parameter and throw HttpNotFoundException.
No, it doesn't, FuelPHP detects it's seen the same route twice. And I've updated the documentation to highlight this issue.
Comment by
WanWizard
December 2011
permalink
Favourite / Best IDE to use with FuelPHP?
That is very decent of you, more people should do that! I have an ExiteCMS license, but I have to say I hardly use it (because I can't find my way around it, because I hardly use it, because...), so I still mainly use geany. I should find the …
Comment by
WanWizard
December 2011
permalink
Rest Controller and Response 1.1
The rest controller is not supposed to return a view, it's supposed to return a data structure. $this->response() requires an array as parameter, which will then be returned in the format requested (json, xml, whatever). If you want to retu…
Comment by
WanWizard
December 2011
permalink
ignoring javascript?
Now you lost me. You started this thread with a list of Asset::js() calls, that looks very FuelPHP to me...
Comment by
WanWizard
December 2011
permalink
How to learn Fuelphp routing
So if I understand correctly, the issue is that ":area1" doesn't give an error, but simply doesn't work, because it has a number in it?
Comment by
WanWizard
December 2011
permalink
Routing don't work well when using named parameter and throw HttpNotFoundException.
There is no question of hacking. The index.php contains the try / catch block that catches and processes the HTTPException. If it is caught, it retrieves the _404_ route, and forges a new Request object using the defined route as URI. And by defaul…
Comment by
WanWizard
December 2011
permalink
Using MongoDB: selecting a document by its ObjectID
So where is it exactly still cast to string? @jsidhu's code snippet is clearly pre v1.1 code...
Comment by
WanWizard
December 2011
permalink
Favourite / Best IDE to use with FuelPHP?
Jelmer Schreuder wrote on Wednesday 21st of December 2011: PHPStorm: It's not free though, but worth the money and free to try. You are entitled to a free license if you can prove you use it for open source development. You need to provide…
Comment by
WanWizard
December 2011
permalink
webz.gr
That would be a large step back...
Comment by
WanWizard
December 2011
permalink
ignoring javascript?
So FuelPHP generates exactly the same HTML as your static version?
Comment by
WanWizard
December 2011
permalink
Hash user password before save
You can't. That would be an observer...
Comment by
WanWizard
December 2011
permalink
ignoring javascript?
Have you compared the HTML generated by FuelPHP with your static version? Any differences? Do they explain the behaviour?
Comment by
WanWizard
December 2011
permalink
Routing don't work well when using named parameter and throw HttpNotFoundException.
You don't describe what happens and what you expected to happen, so this is a bit guess work. But I assume your issue is the 404 route? The exception is handled in your index.php file, where a new request is forged using the _404_ route. As th…
Comment by
WanWizard
December 2011
permalink
More Comments
Howdy, Stranger!
It looks like you're new here. If you want to get involved, click one of these buttons!
Sign In
Apply for Membership
About
Username
WanWizard
Joined
January 2011
Visits
2,390
Last Active
7:35AM
Roles
Administrator