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
REST controller with json - empty output!
Hey guys, I updated the Orm\Model today. Now its ArrayAccess implementation will return the loaded relations as well. And there's a new method for casting the model to an array: $model = Model_Example::find(1); $array = $model->to_array()…
Comment by
Jelmer Schreuder
April 2011
permalink
Folder structure for multiple apps
To be honest, this is for a large part how things are meant to work. That's why the paths in the front controller (public index.php) are configurable. The whole setup is meant to be able to have different apps work with the same packages and c…
Comment by
Jelmer Schreuder
April 2011
permalink
Oauth2
We'd love to add support, but it's not currently planned. To get it included anytime soon it'd have to be community contributed...
Comment by
Jelmer Schreuder
April 2011
permalink
Memory Usage and Speed vs Code Igniter
The only time when Fuel uses more memory is with the ORM class, usually with one-to-many and many-to-many relationships and your retrieving all related data. I'm no expert in ORM, I'm pretty new to it, but I feel something somewhere mi…
Comment by
Jelmer Schreuder
April 2011
permalink
New docs section suggestion
Hey guys, Thanks for the suggestions. We are still planning on where to go next with the docs and no final decission has been made. But it's a safe bet that the look will change (we've asked our site's designer to look into this) an…
Comment by
Jelmer Schreuder
April 2011
permalink
Input Class Sanitation
Fuel offers the following: - configurable input filters (by default none) - htmlawed is included for XSS filtering and accessible through Security::xss_clean(), also usable as input filter (though not recommended due to performance hit it causes)…
Comment by
Jelmer Schreuder
April 2011
permalink
ORM Relating Models with extra join and where
On where/order_by statements for relations: http://dev.fuelphp.com/issues/91 It's planned for 1.1, maybe earlier in the develop branch. EDIT: referenced the wrong issue before.
Comment by
Jelmer Schreuder
April 2011
permalink
Memory Usage and Speed vs Code Igniter
Hmmm interesting points that I hadn't considered, certainly using memory_get_usage() instead of memory_get_peak_usage() seems like pretty shoddy work in the case of Code Igniter. It's a PHP5.2 method so don't expect it anytime so…
Comment by
Jelmer Schreuder
April 2011
permalink
Memory Usage and Speed vs Code Igniter
If memory serves me right it's pretty much the same, but when you try benchmarking the base yourself you should note that there are differences with the default time & memory reporting: Time: ours starts in the front controller, while CI…
Comment by
Jelmer Schreuder
April 2011
permalink
CMS can not be this easy!
What you call "_catchall_" is exactly what WanWizard's suggestion does: it bypasses any filesystem check for a controller and just sends it all to your default controller. The disadvantage of that is that you'll have to register…
Comment by
Jelmer Schreuder
April 2011
permalink
CMS can not be this easy!
Actually I don't agree on this with WanWizard. There's nothing wrong with using the 404 catching this way for the exact reasons you pointed out. There's some downsides however: 1. You should be aware that your request is a 404 reques…
Comment by
Jelmer Schreuder
April 2011
permalink
Format and Inflector classes bug
To let you know: in the develop branch the Inflector::camelize() works as expected again, the Inflector::classify() won't use it anymore though.
Comment by
Jelmer Schreuder
April 2011
permalink
Format and Inflector classes bug
Actually the CamelCase method is still a leftover from the origin of the Inflector when it's classify method didn't respect underscores. The problem is that in Fuel underscores have meaning (= directory seperator) and as such shouldn'…
Comment by
Jelmer Schreuder
April 2011
permalink
CMS can not be this easy!
"Only" the admin left Though I'd use the Uri::segments() method instead and a small correction to your redirect: public function action_index() { $segments = Uri::segments(); //Note $page[0] is empty so ignore…
Comment by
Jelmer Schreuder
April 2011
permalink
Auth driver error
This is one of the docs I should write ASAP but don't have the time to Like you shouldn't extend the core within the core, you shouldn't extend a package within itself (unless of course it's your own package of some kind, than …
Comment by
Jelmer Schreuder
April 2011
permalink
Security in my app classes etc..
When uploading an application you do it either outside your webroot, or (when that's impossible) you use a .htaccess file to disallow http access to the files in the fuel directory. When no such option or similar option is available you have t…
Comment by
Jelmer Schreuder
April 2011
permalink
Problem while relating models
Almost what PaulboCo said, 2 corrections to his models: Model_Objanswer : class Model_Objanswer extends Orm\Model { protected static $_properties = array('id','qid','otext'); protected static $_belongs_to = array(…
Comment by
Jelmer Schreuder
April 2011
permalink
Uploading
Huglester created an example using upload & Auth. Here's the forum topic and the controller with the Upload class usage.
Comment by
Jelmer Schreuder
April 2011
permalink
Variables in the view
$this->template->content = View::factory('users/create')->set('countries', Helper::countries(),false); Here you request the view "users/create", but that doesn't match the error: ErrorException [ 4096 ]…
Comment by
Jelmer Schreuder
April 2011
permalink
ORM Method chaining
Ah, you found a bug - when inputting an array the order_by() method doesn't return its object to allow chaining. I'll fix this in the repo for the next release, for now the following should work: $data['results'] = Model_Blog:…
Comment by
Jelmer Schreuder
April 2011
permalink
ORM many:many - relation
$product = Model_Product::find(1, array('related' => array('categories'))); $category = Model_Category::find(5); $product->categories[] = $category; $product->save(); // after fetching and after saving you can be sur…
Comment by
Jelmer Schreuder
April 2011
permalink
ORM Method chaining
$data['results'] = Model_Blog::find()->order_by(array('blog_date' => 'desc')); This won't do a query because you don't tell it to. You create the query using find(), tell it to order desc by blog_date…
Comment by
Jelmer Schreuder
April 2011
permalink
Profiling database issue
Hey Phil, You already made a bugreport out of this, no need to cross-post.
Comment by
Jelmer Schreuder
April 2011
permalink
ORM model not working?
Maybe this should have given a clue whether I consider this a something that needs fixing: Apprently I didn't test it using new without input Will be fixed by next release (RC2 or final) and in about 5 minutes in the repo. There's no…
Comment by
Jelmer Schreuder
April 2011
permalink
ORM model not working?
Apprently I didn't test it using new without input - the factory does accept it without args. It used to have a private constructor but after a rewrite there was no longer need to have the constructor inaccessible so shortly before RC1 release…
Comment by
Jelmer Schreuder
April 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