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
Error 2048 - Declaration of before() should be compatible with that of Controller_Template::before()
I've put a notice in the docs to check the parent definitions when overloading methods.
Comment by
WanWizard
August 2011
permalink
Auth::check() is run twice?
I would say it's worth looking into, because it should not be needed. I can't comment on it without diving into the code, maybe it's something for Jelmer, as he wrote it...
Comment by
WanWizard
August 2011
permalink
Error 2048 - Declaration of before() should be compatible with that of Controller_Template::before()
Check the method definitions in Controller_Template (fuel/core/classes/controller/template.php). You'll see that before is defined as public function before($data = null)
Comment by
WanWizard
August 2011
permalink
"Helper" functions for use in apps
Put it in an application class (in app/classes), and define it as a static method. Then use Classname::helper() in your code to call the helper...
Comment by
WanWizard
August 2011
permalink
Auth::check() is run twice?
The Auth package does an automatic check for the default instance, when it is loaded ( in auth/classes/auth.php, method _init() ).
Comment by
WanWizard
August 2011
permalink
Assest throwing a 404
The base_dir isn't involved in loading code, that works relative to the index.php, based on the paths you have defined in there. But for classes like Assets and Uri to generate the correct URI's (prefixed with /my-app/), the base_dir must…
Comment by
WanWizard
August 2011
permalink
How to check if record was found
Still find this odd. TS mentioned "$name can be an empty string or a string value". In case of an empty string, find() will return query()->get_one(). Which should either return a model object containing the first record found, or null…
Comment by
WanWizard
August 2011
permalink
Assest throwing a 404
So it is not installed in the document root, but in folder called 'my-app' in the document root? In that case you'll have to update the config, as the generated URL's need to be prefixed by 'my-app'. Set your base_url…
Comment by
WanWizard
August 2011
permalink
csrf help
I've implemented it in my app now, and it works as advertised.
Comment by
WanWizard
August 2011
permalink
API Client?
Support for building REST clients is on the roadmap.
Comment by
WanWizard
August 2011
permalink
Best practise: Total results + Limit / Offset
Then you'll go to three queries. And currently this can not be implemented, because our Query Builder generates SQL-92 code, and can't deal with the specifics of an RDBMS engine. Improving this is on the roadmap.
Comment by
WanWizard
August 2011
permalink
possible bug / mod?
That might be because there is no app/vendor directory, and creating on hasn't been part of the plan? core/vendor are third party pieces of code that we believe must be part of the core. All other third party code should go into a package.
Comment by
WanWizard
August 2011
permalink
Session::set() in Ajax file not available after refresh
Set the log threshold to L_ERROR or higher, and check the logfiles. If there is a session concurrency issue, it will be logged. Which session driver are you using?
Comment by
WanWizard
August 2011
permalink
How to check if record was found
An empty string is not a special parameter for find(). If $name = '', it will translate to SELECT * FROM link WHERE id = ''; Whether or not this returns null, depends on if this query will return records or not.
Comment by
WanWizard
August 2011
permalink
How to setup code completion in Phpstorm?
Core classes are aliased into the global namespace, but PHPStorm doesn't know that. Create a php file in the fuel root, and add this to it: http://scrp.at/cf3ef86f6abd0cd1aa8dd5d327bc66b3cfcbf5f5. PHPStorm will rescan it, and know the correct …
Comment by
WanWizard
August 2011
permalink
How to setup code completion in Phpstorm?
Solved how? Maybe that can help other users with the same problems...
Comment by
WanWizard
August 2011
permalink
help me understand how to use fuel-nestedsets package
Thanks, it's always handy to have someone else test it as well. p.s. I'll move this thread to the "Code Share" forum, where it belongs...
Comment by
WanWizard
August 2011
permalink
help me understand how to use fuel-nestedsets package
The package is still in active development, so it could be that things don't work as expected. The issue here is that you're calling tree_new_root() statically, which you can't, it's an object method. Because of the way you call…
Comment by
WanWizard
August 2011
permalink
Understanding viewModel
A Viewmodel class has the same set of methods as a View class, so you can use set() like you're used to.
Comment by
WanWizard
August 2011
permalink
Autoloader bug with custom namespaces?
Please report this as an issue on http://github.com/fuel/core/issues.
Comment by
WanWizard
August 2011
permalink
csrf help
I've added a new js_set_token() method to the Security class, to aid in this situation. You can now do this in your view: ('on' and 'submit' is one word! the forum eats it if I use that) This will automaticall…
Comment by
WanWizard
August 2011
permalink
csrf help
Hmm... That needs a lot more documentation. I've seen that one, but never understood what it's for. I'll try that, but it doesn't look that easy. All the javascript function does is return the cookie value. In an onsubmit, you n…
Comment by
WanWizard
August 2011
permalink
ORM multiple updates
No, there isn't. An ORM works with objects, where every object represents a row in a database table. This implies you will have to iterate over the objects retrieved in a query, and save them one at the time. The ORM does update related record…
Comment by
WanWizard
August 2011
permalink
migration problem
There is an issue in de code with the first migration, as it can't distinguish between null and 0. I saw a pull request to fix it, but I'll leave this to Phil, he's in charge of Oil. Just watch the commit messages on the develop bran…
Comment by
WanWizard
July 2011
permalink
Error handling question (v.1.0)
I don't know of an easy way to find that out. But since you're triggering the error yourself by throwing the exception, you could pass something in the error message, or use the error code, to indicate what it is? // throw a normal text…
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
9:34AM
Roles
Administrator