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.
Jelmer Schreuder
Fuel core developer, check my bio on the about page.
Discussions
1
Comments
792
Activity
'&' (ampersand's) in Form Input fields
[EDITed: I changed this just now in the dev branch to work better] Use a form.php config file or set this after you've loaded the form class but before rendering the form: Config::set('form.prep_value', false); And it shouldn'…
Comment by
Jelmer Schreuder
May 2011
permalink
Global cache on/off
Guys, you must finish faster! I'm going to ignore this, as the choice is for me to either ignore that or the person who thinks that telling us to work harder on something that doens't make us a penny is something he even remotely has …
Comment by
Jelmer Schreuder
May 2011
permalink
Unexpected result from File::read
The docs aren't entirely complete on this, when $as_string is set to false the file's contents are added to the output without going through PHP. When the $as_string param is true the contents are returned. It's 2 ways of reading the…
Comment by
Jelmer Schreuder
May 2011
permalink
Convert ORM Object to Simple Object
$model->to_array(); Should be enough, I don't see any use in converting it to a stdClass object.
Comment by
Jelmer Schreuder
May 2011
permalink
Catch non-existent database
Put something like this at a point where you are sure there's no queries ran earlier: try { \Database_Connection::instance()->connect(); // put your db connection name in instance($name) if you want a non-default connection group } ca…
Comment by
Jelmer Schreuder
May 2011
permalink
parser class file extension
Just create a parser.php config file in app/config where you overwrite the parser.extensions value: https://github.com/fuel/parser/blob/develop/config/parser.php#L5 Also, if your IDE doesn't support adding extensions for code formatting it pre…
Comment by
Jelmer Schreuder
May 2011
permalink
Execution Time and Other Stats...
Use this method.
Comment by
Jelmer Schreuder
May 2011
permalink
how can i extend orm model ?
Because the Orm isn't aliased you can't extend it like other parts of the Fuel core. Just use your class like you defined it, but register it in the bootstrap as "Model" (there's one in the core which you overwrite) and mak…
Comment by
Jelmer Schreuder
May 2011
permalink
any news on rc3 ?
Dan was planning to release it wednesday, not sure what the delay is. The current dev branch is very stable, more so than RC2(.1) even as far more bugs have been fixed.
Comment by
Jelmer Schreuder
May 2011
permalink
Validation with a Closure given to the add_rule
No, but it's clearly a bug. If you make a bugreport at https://github.com/fuel/core/issues I'll take a look and fix it this weekend.
Comment by
Jelmer Schreuder
May 2011
permalink
own observer still dont work
Ahh, that's your fault. First take a look at the error you just posted and then at this method: public function before_save(Model $model) { } Your observer is in your own namespace so if you typehint Model from there it…
Comment by
Jelmer Schreuder
May 2011
permalink
How to Fight CSRF?
Have you tried checking if Input::post('token') and Input::cookie('token') both return a value and match? Otherwise there might be something wrong with either the posted value or the cookie.
Comment by
Jelmer Schreuder
May 2011
permalink
own observer still dont work
Are you on the latest from the Orm develop branch? Is the model in the same namespace? Have you tried adding the observer with a full classname: "Kancelarske\\Observer_Examplex"
Comment by
Jelmer Schreuder
May 2011
permalink
how to extend ftp class ?
I just made it protected instead of private.
Comment by
Jelmer Schreuder
May 2011
permalink
how to extend ftp class ?
Ftp class hadn't been used/updated for a long time, it didn't do "new static" in the factory. I'll fix that.
Comment by
Jelmer Schreuder
May 2011
permalink
Should I Create Separate Methods for Form Presentation and Processing in Controller?
I have a couple of ways of doing this which I'll list below. It's worth it to note that I always redirect after processing to prevent resubmit by refresh, thus the confirmation of submit is given on a separate page or as a message on anot…
Comment by
Jelmer Schreuder
May 2011
permalink
tasks :: how to include a model into tasks ?
What is the namespace of the model? Once you've run add_package() it will be available like always, with the full classname though and starting with a backslash as the file itself is in Fuel\Tasks and you need to start from global: \Model_Ex…
Comment by
Jelmer Schreuder
May 2011
permalink
Common rules in model
Not yet.
Comment by
Jelmer Schreuder
May 2011
permalink
Views within views
View::factory('view_filename'); Docs
Comment by
Jelmer Schreuder
May 2011
permalink
When related result doesn't exist ..
Take a look at this line: $this->user = Model_User::find()->where('id', $user[1]); At which point do you expect it to execute and fetch the user from the DB? To translate what it says to normal english: "I want you to find a …
Comment by
Jelmer Schreuder
May 2011
permalink
Form::select with Variables
This is a known bug in RC2(.1) is solved in the develop branch and will be fixed in the ASAP to be released RC3 (was supposed to be last night, hopefully later today).
Comment by
Jelmer Schreuder
May 2011
permalink
When related result doesn't exist ..
No, not at all, there's a lot wrong with that. I'll just rewrite it to something that will work: $user = Model_User::find()->where('id', $user_id)->related('projects')->get_one(); if ( ! empty($user)) { ret…
Comment by
Jelmer Schreuder
May 2011
permalink
When related result doesn't exist ..
Actually I should have been more complete. Your code, directly chaining from the find() method isn't really good practice. find($id) retuns null when nothing is found, which would throw an error in your code. I'd suggest first assigning t…
Comment by
Jelmer Schreuder
May 2011
permalink
When related result doesn't exist ..
It's a known bug in RC2(.1), has already been fixed in the repo and will be in RC3 which should be released tonight (EST).
Comment by
Jelmer Schreuder
May 2011
permalink
Extending Controller and passing data
Create a router() method that filters some parts out before calling the controller method? http://fuelphp.com/docs/general/controllers/base.html
Comment by
Jelmer Schreuder
May 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
Jelmer Schreuder
Joined
January 2011
Visits
7
Last Active
May 2016
Roles
Administrator