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
8242
Activity
Cannot update using ORM
As I wrote, get() returns an array of objects. The array has an index value equal as the primary key. How do you access array values? That has nothing to do with ORM, that's PHP 101. You can use foreach to iterate over it. You can use $arrayna…
Comment by
WanWizard
February 2012
permalink
Why does Fuel inserting null values to fields?
I think that is already fixed in the development docs.
Comment by
WanWizard
December 2011
permalink
How to pass data from Controller to ViewModel ?
I just noticed the Viewmodel class isn't documented. You interface with a Viewmodel object the same way as with a view, using the set() method. $viewmodel = Viewmodel::forge('chose/view'); $viewmodel->set('var', $valu…
Comment by
WanWizard
February 2012
permalink
Cannot update using ORM
If $post is an ORM model object, you can't get() it! You can only get() find queries. So: // find all users (returns an array of Model_Blog_User objects) $users = Model_Blog_User::find('all'); // find the first user (returns a Model…
Comment by
WanWizard
February 2012
permalink
Cannot update using ORM
get() returns an array of objects. Did you actually look at the documentation? This is all explained including examples.
Comment by
WanWizard
February 2012
permalink
Why Fuels is not usnig current K3.x routing ?
FuelPHP is not a Kohana clone. We simply used a bit of logic from them in the first couple of months, but all of that is slowly disappearing. The biggest chunk of Kohana code that is still present is the database layer, and that is going to be rep…
Comment by
WanWizard
February 2012
permalink
Cannot update using ORM
You can only get a query. The way find() works is explained in the documentation. In short, 'first', 'last' and 'all' do an implicit get(), find() without parameters creates a query object that you can use to chain add…
Comment by
WanWizard
February 2012
permalink
Why Fuels is not usnig current K3.x routing ?
FuelPHP is using neither. It uses FuelPHP routing. If you want to discuss missing functionality, please do so, and we can see what we can do.
Comment by
WanWizard
February 2012
permalink
Why does Fuel inserting null values to fields?
To generate a form from a model, the add_model() method of the Fieldset class is used. The parameters that can be used in the 'form' array of the field properties are the same as can be passed to the Fieldset add() method. Validation is d…
Comment by
WanWizard
December 2011
permalink
ORM and Pdo (sqlite)
There is a rewrite of the DB layer planned for 2.0, which will introduce platform dependent drivers. Currently the architecture requires an ANSI SQL compliant backend, and this can not be changed easily.
Comment by
WanWizard
August 2011
permalink
Cannot update using ORM
That doesn't get anything, that just returns the query object. You have to do either get() or get_one() to execute the query.
Comment by
WanWizard
February 2012
permalink
fiels issue
what is 'set'? You specify enum values using "moderer:enum[oui,non]", not using set. Like explained in the post I linked.
Comment by
WanWizard
February 2012
permalink
Controller generating & warning
This is a bug that is fixed in 1.1/develop.
Comment by
WanWizard
February 2012
permalink
Microsoft SQL Server driver?
Currently there isn't. I've got one that sort of worked, but has been designed for 1.0, so chances are it doesn't work anymore with the latest code. Implementing it is not easy due to the current DB driver and Query Builder architec…
Comment by
WanWizard
February 2012
permalink
migrations, file prefixes and version numbers
This is how it works. Every migration file is a migration step. If you want this all to be one version, simply move the up() and down() code from 002 to 005 into 001.
Comment by
WanWizard
February 2012
permalink
Session flash message disappearing after redirect
Report it as an issue to Sentry. Sentry should not destroy the session on logout (destroying sessions for purposes like that is always a bad idea), instead they should only remove the Sentry specific variables.
Comment by
WanWizard
February 2012
permalink
Pagination HTML is escaped
as a security measure, FuelPHP escapes on output. That means everything you send to a view gets escaped, unless you explicitly tell it not to. So do // Config::set('pagination', $config); // you can use this too! Pagination::set_config($c…
Comment by
WanWizard
February 2012
permalink
prefix url
You should not define the language in your bootstrap. Do not try to reinvent the wheel. 'language' and 'language_fallback' are both config items (defined in config/config.php), you should use those. Define your fallback and def…
Comment by
WanWizard
February 2012
permalink
prefix url
You store it in the config, so get it from there: $current_lang = \Config::get('language');
Comment by
WanWizard
February 2012
permalink
prefix url
There is a more detailed discussion about this subject here: http://fuelphp.com/forums/topics/view/1064#7544
Comment by
WanWizard
February 2012
permalink
Clean Url Problem
Sorry, my bad. The Controller doesn't have a request() method, it's a property. So it should be $param = $this->request->param('pageurl');
Comment by
WanWizard
February 2012
permalink
I am missing something
It uses the config in the config/validation.php file to generate the result. Perhaps something wrong there?
Comment by
WanWizard
February 2012
permalink
Int value converted into string using query builder?
Ah, wait, it isn't surrounded by quotes, it's surrounded by backticks. Yes, the on() method expects two field names, and therefore escapes them. You can avoid that by using DB::expr(). ->on('comment_votes.user_id', '=&…
Comment by
WanWizard
February 2012
permalink
Special route config question, by newbe
Nothing to do about it, there is no way to know to what you want to route /this/that/other. Is 'this' a brand name'? In what language is 'that/other'? Where should it map to?
Comment by
WanWizard
February 2012
permalink
JSON from MYSQL is not valid json
Was fixed in an IRC discussion. For other readers: the DB result was passed to a view, and decoded there. FuelPHP's default output encoding caused the json in the passed result to be malformed.
Comment by
WanWizard
February 2012
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,374
Last Active
5:26PM
Roles
Administrator