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
routing and 404
As you correctly observed, you can not have AND an (:any) route, AND a 404 route, as the any will capture everything. If you have a need for an any route, you'll have to deal with 404 situations in the controller that your any route points to.…
Comment by
WanWizard
September 2011
permalink
im getting this error ..No uploaded files are selected.
I don't understand. The TS wrote that he used this code: echo Form::open('welcome/submit',array('enctype'=>'multipart/form-data')); and that generates the incorrect HTML, as shown above. You asked how that…
Comment by
WanWizard
July 2011
permalink
MongoDB status and usage
The MongoDB class was written because there was a need for it, and our current DB environment isn't flexible enough to accomodate other database engines at the moment. A rewrite of the query builder and DB driver system is on the roadmap, whic…
Comment by
WanWizard
September 2011
permalink
Question on Security class
I don't know why it was decided to whitelist a stdClass, as it 's perfectly possible to process them (although it will not be fast). Maybe Jelmer can comment?
Comment by
WanWizard
September 2011
permalink
im getting this error ..No uploaded files are selected.
The error here is that the Form::open() method is used wrong. It accepts either a URI as first parameter, or an array with tag attributes. So you need to pass an array if you have more then only the URI: Form::open( array('action' =>…
Comment by
WanWizard
July 2011
permalink
Loading Module Views to Controller
Fuel encodes on output, not on input. So everything you send to your views will be encoded unless you tell it not to. public function action_index() { $this->response->body = View::factory( 'welcome/index'); $this->re…
Comment by
WanWizard
September 2011
permalink
Route from controller
There are several ways to achieve that. You can add code to the config/routes.php, and just generate custom routes (from for example a database). You can cache that for performance reasons. You can use a front controller. Just route all requests to…
Comment by
WanWizard
September 2011
permalink
Regenerate Session ID
That is indeed best practice. We've decided this week to build this into the Auth package.
Comment by
WanWizard
September 2011
permalink
Regenerate Session ID
Fuel's session class regenerates it's session ID automatically, with the interval defined in the session config by the key "rotation_time". By default, this happens every 300 seconds. If you absolutely want, you can do it manual…
Comment by
WanWizard
September 2011
permalink
Documentation for Caching
Cache uses dot-notation, like many other classes in Fuel. In case of the file driver, a cache identifier like "this.that.something" will create a cache file called "something" in the "cache/this/that" directory.
Comment by
WanWizard
September 2011
permalink
Is there a routing solution for this?
This should work fine: 'users/(:num)' => 'users/view/$1' 'users' => 'users/list' I don't think the first rule will match if there is no numeric parameter present.
Comment by
WanWizard
September 2011
permalink
Packages, Namespaces, and Re-usable Code
Packages are considered core extensions. As such, you can not route to controllers in packages, altough you could probably work around that by adding your package classes to the global namespace. If you want modularity in your applications frontend…
Comment by
WanWizard
August 2011
permalink
Using before()
The message is very clear. Have you checked it? If you're using a Fuel core from before August 14th, before() is defined with a parameter in Controller_Template, so your prototype must define that as well. https://github.com/fuel/core/commit/d…
Comment by
WanWizard
August 2011
permalink
Creating a payment gateway interface
If that doesn't work, you have made an error in defining the package classes. Have a look at my simplepie package as an example: https://github.com/WanWizard/fuel-simplepie All package related operations should be from within the package, to m…
Comment by
WanWizard
August 2011
permalink
Unusual behavior with $view->set('item',$myitem,false);
The way data is escaped (filtered) has been modified in 1.1/develop. It now uses 'lazy escaping', that is the escaping only happens when the data is sent to the view, and no longer when you set it.
Comment by
WanWizard
August 2011
permalink
Counting Lazy-Loaded One-To-Many Relationship Entities
count() does run a count query, but currently it works for the main table only, not for related tables.
Comment by
WanWizard
August 2011
permalink
Counting Lazy-Loaded One-To-Many Relationship Entities
No, you can't. If you don't use eager loading, nothing is loaded, so there's nothing to count. To count, you need to load them (which is a query) or run a count query (is a query too). You can switch to eager loading, which also is a…
Comment by
WanWizard
August 2011
permalink
A proposal for caching ORM queries
Be careful that you don't fall into the trap of using ORM for all database interactions. ORM is great is you need object based access to individual records, for example for CRUD operations. ORM is definately a bad idea if you want to do an …
Comment by
WanWizard
August 2011
permalink
About roadmap: "New loader mechanism"
Two different things. The Request needs a URI, the View a (relative) path. For the path (not only for views), there is no way to specify that you want to load something from a module. I agree that this is something that needs to be looked at, but I…
Comment by
WanWizard
August 2011
permalink
A proposal for caching ORM queries
You can get a 30% increase if you add a single ORM call to a "hello world" controller, and then add caching to it, which needs to load extra classes and need some memory to process the result (Fuel reports peak memory used). The question …
Comment by
WanWizard
August 2011
permalink
Calling procedure error - Commands out of sync; you can't run this command now
I vaguely remember seeing something in the code that the results are only flushed at a particular size of the result set, and not always. This might be the issue here. Please add a ticket to the issue tracker on github, so we can investigate it.
Comment by
WanWizard
August 2011
permalink
Problem with Agent class after upgrade to 1.1 dev
Possibly. Add this to the issue tracker so we can have a look at it.
Comment by
WanWizard
August 2011
permalink
Creating a payment gateway interface
Classes in packages are in their own namespace, so you should call them like \namespace\Gateway.
Comment by
WanWizard
August 2011
permalink
Cms
That is correct.
Comment by
WanWizard
August 2011
permalink
PostgreSQL Database Driver
If you want this to be usable for other Fuel users, you'll have to make it a package. You should (nay must) not hack in the core code. Make the package part of the core (see Auth on how to do that), and make sure you follow the same path struc…
Comment by
WanWizard
August 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,368
Last Active
6:03PM
Roles
Administrator