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
8243
Activity
lang class
What is not working? And what does your 'exemple.php' language file contain? If you do Lang::get('test.1'); it shoud contain return array( '1' => 'some text here', );
Comment by
WanWizard
March 2013
permalink
Working with images
I've never used the Image class myself, but the load() method in the docs gives an example with Upload.
Comment by
WanWizard
March 2013
permalink
Working with images
Assuming you have setup your configuration correctly, the first thing you do is run Upload::process(). After that, you can call Upload::get_errors(), to see if there were any processing errors. This call returns an array with an array for every fil…
Comment by
WanWizard
March 2013
permalink
Working with images
Your working on a PHP installation that is not according to the standards. PHP 5.3+ should have the finfo module installed by default. If this is locally, you should fix your installation. If this is a hoster, kick him in the nuts for not providing …
Comment by
WanWizard
March 2013
permalink
ErrorException in Obsever
When defining class properties, you can only assign scalar values. So no method or function calls, no object access, no variables, etc. This is not supported by PHP: public static $current_user = \Warden::current_user()->id;
Comment by
WanWizard
March 2013
permalink
Updating FuelPHP with git
You need to update the submodule references in your "main" app repository, for others to pull these in automatically. You do that by going into the submodule repo's (for example fuel/core), do a 'git checkout ', and a '…
Comment by
WanWizard
March 2013
permalink
Working with images
You need to Upload class to processing the form upload. You need the Image class if you want to manipulate the image after uploading. There's an example in the docs on how to process uploads: http://docs.fuelphp.com/classes/upload/usage.html#/…
Comment by
WanWizard
March 2013
permalink
Unit Tests with Visual PHPUnit
Why not? Never had any complaints about that. Any errors?
Comment by
WanWizard
March 2013
permalink
Change output in form
No problem, English isn't my native language either...
Comment by
WanWizard
March 2013
permalink
Unit Tests with Visual PHPUnit
if you're using the commandline, you should use oil to run your tests. Everything is setup for that. The bootstrap gets it's data from the xml file: which are paths relative to the …
Comment by
WanWizard
March 2013
permalink
Module : Edit the route
Can't think of it. Module routing is a long outstanding issue that we don't have a good solution for, but is on the table to address in 2.0.
Comment by
WanWizard
March 2013
permalink
URL Route with language
Very clean solution. Downside is that it will have some overhead due to the second request. I would remove check and remove the first segment in the index.php from $_SERVER['REQUEST_URI'], after calling the app bootstrap, but before firi…
Comment by
WanWizard
March 2013
permalink
Change output in form
If you're talking about fieldsets, the fieldset template is in the form.php config file. Copy it from fuel/core/config to fuel/app/config, and make your modifications.
Comment by
WanWizard
March 2013
permalink
Return response in Before Method in REST Controller
Thought this was such a great idea I just added it to 1.6/develop. You can now define an internal auth method in the config file. If this method exists it will be called by the router() to verify authorization. If should return true if authorized, …
Comment by
WanWizard
March 2013
permalink
Change models using oil
I understand the reason for wanting this. The big problem is that files may have been changed manually after generation. This is the case with everything oil generates. If overwriting is not a problem, you can just generate again, but you have to s…
Comment by
WanWizard
March 2013
permalink
RC2 Auth Package Error
Correct. According to the FuelPHP coding standards, and the way the autoloader works, Classnames should be ucfirst(). I am clueless to why Jelmer decided in the past do deviate from this rule, because it breaks extending if you want to place your…
Comment by
WanWizard
March 2013
permalink
Return response in Before Method in REST Controller
Formatting of the response happens in the REST controllers after() method, if your action returns an array. It does so based on the format (defined or detected), and that happens in the router() method. Perhaps it would be an idea to extend the fun…
Comment by
WanWizard
March 2013
permalink
Unit Tests with Visual PHPUnit
Just checked the config of VPU. It allows you to specify the phpunit.xml to load, and it also allows you to define additional bootstrap scripts. So you should be able to construct a config that works from both from our versions in fuel/core.
Comment by
WanWizard
March 2013
permalink
Unit Tests with Visual PHPUnit
Well, somewhere in that code it starts PHPunit. You might be ok when you can convince it to use our phpunit.xml, which is in fuel/core, and which contains the bootstrap needed to initialize PHPunit for FuelPHP. Or if it requires it's own xml…
Comment by
WanWizard
March 2013
permalink
Unit Tests with Visual PHPUnit
If you're using PHPunit stand-alone, the rest of the framework, including the autoloader, isn't loaded, which could explain why it doesn't work. You run tests using 'php oil test', which sets everything up before calling PH…
Comment by
WanWizard
March 2013
permalink
Sets of checkboxes
Thanks for the kudos. That keeps us going!
Comment by
WanWizard
March 2013
permalink
Change models using oil
Manipulating existing code, that you may have changed manually, would require a complete PHP parser, so you can insert your changes at the right location. Very complex, and imho not worth while. By the time you have typed in the oil command, you…
Comment by
WanWizard
March 2013
permalink
Sets of checkboxes
Just checked the code. Objects can't be encoded unless they have a __toString() magic method, or implement Iterator or ArrayAccess, or are an instance of stdClass. Since a fieldset object has the magic method, encoding it triggers that method…
Comment by
WanWizard
March 2013
permalink
Sets of checkboxes
That looks ok, and should work without problems. I do this in every app. Your model contains a property called 'field_id'?
Comment by
WanWizard
March 2013
permalink
Upload a Image to SQL database using FuelPHP
Error message is pretty clear? Does that view exist? Is the module 'receipts' loaded?
Comment by
WanWizard
March 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,390
Last Active
7:35AM
Roles
Administrator