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
8248
Activity
REST Controller ignoring $rest_format variable?
The reason for this sequence is that it's considered good practive to use the HTTP ACCEPT header to signal the type of response the client wants. Ideally you should not restrict the client as to the desired format, and for your REST API it do…
Comment by
WanWizard
January 2013
permalink
_404_ overwrite the Uri::segment ?
Yes. 404 is generated by the router when it detects it has nowhere to route, and it will do that by throwing an HttpNotFoundException. If you don't have any code in place to capture that exception, it will bubble up to your index.php, where i…
Comment by
WanWizard
January 2013
permalink
How can I set multiple primary keys at creating new record?
The first one should work to. As long as a model is in "new" state, AND no value has been assigned to the primary key column(s), you should be able to assign it like that too. Are you use that exact syntax isn't working? And if so,…
Comment by
WanWizard
January 2013
permalink
Php quick profiler bug?
Database profiling needs to be enabled seperately since it's quite performance impacting. You enable it on a per-connection basis, in your db.php (profiling => true).
Comment by
WanWizard
January 2013
permalink
MySQL and MongoDB in parallel
Let's correct that: There isn't anything "derived" from CodeIgniter in FuelPHP, other than the Unzip class. At the moment, Mongo and Redis are supported through separate classes, they don't run via the query builder. So it&…
Comment by
WanWizard
January 2013
permalink
Fieldset properties for ORM model, fetch from DB
Is this perhaps not the first time you use a fieldset for that model? Fieldsets are cached, so a second call will return the first fieldset. The options ($_property[fieldname]['form']['options']) are processed before adding the …
Comment by
WanWizard
January 2013
permalink
FuelPHP benchmark
Correct. They added one database query to it. I don't expect that to make much difference, how inefficient can you make a query builder?
Comment by
WanWizard
January 2013
permalink
ScrapYrd closed?
It was Dan's, don't know what happened to it. FuelPHP is officially using http://snipr.it, which is on what scrapYrd was based.
Comment by
WanWizard
January 2013
permalink
FuelPHP benchmark
I still have to see the first benchmark that actually says something. In the link you posted, they test 'Hello World'. Depending on the bootstrap code of the framework, that can either be extremely fast (since nothing is loaded but the ab…
Comment by
WanWizard
January 2013
permalink
Share your knowledge!
I suggest you wait with that until 2.0 comes out, as it will be quite different from 1.x.
Comment by
WanWizard
January 2013
permalink
How to setup Hybrid controllers to return json for ajax/non-ajax calls?
I don't think the Depot code is fully compatible with the latest FuelPHP version...
Comment by
WanWizard
January 2013
permalink
Sentry - Authentication Package
--packages or -p, not --package
Comment by
WanWizard
January 2013
permalink
Can the profiler be enabled from anywhere else but config?
You'll also have to tell Fuel you've manually activated it, otherwise the output will not be generated: \Fuel::$profiling = true; Which I agree can be more efficient, so I've moved everything into Profiler::init() for 1.5.
Comment by
WanWizard
January 2013
permalink
Help with modifying form data
The object data is not in the properties array, it just holds the data definition. An observer gets passed the object it observes: public function _event_before_save(Model $obj) { $obj->lft = 100; }
Comment by
WanWizard
January 2013
permalink
ORM Class table inheritance and polymorphic relations
No, you'll need an ORM that uses the Datamapper pattern for that, with an Activerecord pattern based ORM it's very difficult to implement. It's on our minds, but not on the roadmap atm.
Comment by
WanWizard
January 2013
permalink
JSON output not correct using Controller_Rest with post_* function
Bug reports go to http://github.com/fuel/core/issues
Comment by
WanWizard
January 2013
permalink
Can the profiler be enabled from anywhere else but config?
The profiler is only enabled when you enable it in the config, if not it's not loaded, only the Profiler class itself is loaded (because the internal profiling commands are still called). And what's the difference between $this->outpu…
Comment by
WanWizard
January 2013
permalink
Using ORM with a "friends" table
You can't use ORM\Model directly, it's a base class. As you observed, to_object() uses the selected drivers native command to create the objects, in this case "mysql_fetch_object". Looks like it can't deal with the exceptio…
Comment by
WanWizard
January 2013
permalink
JSON output not correct using Controller_Rest with post_* function
That's odd, because I use that on a daily basis. As you'll see in Format::to_json(), it does nothing but a json_encode(). It even explicitly converts an object to an array before encoding it. There is a note in the PHP json_encode() com…
Comment by
WanWizard
January 2013
permalink
smarty outputting blank page with no errors
"stat failed" usually means it can't read the file. From the looks of it, it might be sloppy programming: http://www.smarty.net/forums/viewtopic.php?p=79296
Comment by
WanWizard
January 2013
permalink
JSON output not correct using Controller_Rest with post_* function
response() will just do a json_encode() of the array passed (assuming it has to return json, so if that is configured correctly), and return that as-is. I use it on a daily basis. Have you checked (with for example Firebug) what is actually request…
Comment by
WanWizard
January 2013
permalink
Using ORM with a "friends" table
What does that model's constructor look like? Because as_object() using an ORM model is not a problem, that should work fine.
Comment by
WanWizard
January 2013
permalink
'like' argument
Most are there: http://docs.fuelphp.com/classes/database/usage.html#filtering
Comment by
WanWizard
January 2013
permalink
Problem with Auth Tutorial when not being an Admin user
That's not how the oil templates are designed. Only admin has access to the admin section. What happened, as I can't see an issue with this code atm?
Comment by
WanWizard
January 2013
permalink
Problem with Auth Tutorial when not being an Admin user
You have to capture the access failure in the before: if (Auth::check()) { // only allow admin access, or login/logout if ( ! Auth::member(100) and ! in_array(Request::active()->action, array('login', 'logout'))) …
Comment by
WanWizard
January 2013
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,481
Last Active
8:08AM
Roles
Administrator