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
Get id from simpleauth?
cool, problem solved then! ;-)
Comment by
WanWizard
May 2014
permalink
index.php display_errors
lol, remove the core folder. Like "I want a warning sign on my car dashboard if someone has removed the engine"... :-) There are several solutions to a maintance page, depending on your environment: The best solution is completely outs…
Comment by
WanWizard
May 2014
permalink
index.php display_errors
Can you give an example (or screenshot). That should not be the case so we need to look into how to prevent that (instead of worked around ;)). Apart from that: ideally your application should have a maintenance mode for these operations, processin…
Comment by
WanWizard
May 2014
permalink
index.php display_errors
No. A Fuel app will never display errors, or divulge any application details, in a production environment. In what situation whould you see an error that isn't handled?
Comment by
WanWizard
May 2014
permalink
"No changes allowed" when attempting to delete parent model
You get a FrozenObject Exception when there is an attempt to modify an object that is being saved or deleted (this is to prevent recursion into relations). Could you swap your ORM install for the 1.8/develop version (just do a pull and checkout if …
Comment by
WanWizard
May 2014
permalink
ORM Memory leak
The ORM caches in memory, on a per-request basis, which is why memory consumption grows with every object created. There is no method to reset the cache, but you can easily add one to your model, or to a base model class if you have one. All you n…
Comment by
WanWizard
May 2014
permalink
Get id from simpleauth?
get_user_id() is the method to use. The docs (http://docs.fuelphp.com/packages/auth/simpleauth/usage.html#/method_get_user_id) gives examples of how it works. The question is why your user object doesn't have an 'id' field, as it is …
Comment by
WanWizard
May 2014
permalink
Cache visibility between task & app
Just tried that (using the 1.8/develop codebase), and I can not reproduce it. Action on the oil commandline to show the value is set: [hverton@catwoman] $ php oil console Fuel 1.8-dev - PHP 5.5.12 (cli) (May 3 2014 07:09:18) [Linux] >>> …
Comment by
WanWizard
May 2014
permalink
Cache visibility between task & app
memcache or memcached?
Comment by
WanWizard
May 2014
permalink
ORM Memory leak
The ORM caches all objects it sees for re-use, it has never been designed for batch operations. Perhaps this is the issue?
Comment by
WanWizard
May 2014
permalink
HHVM
i know. But no time, and the priorities are elsewhere at the moment.
Comment by
WanWizard
May 2014
permalink
Using lang from database
The structure of the language table, and how to define which table contains your lang strings, is documented in the introduction of the lang class. Selecting the backend for Lang works the same as with all other Fuel classes that have this function…
Comment by
WanWizard
May 2014
permalink
Who to execute this using DB::query() method
p.s. print_r() works too, but the result is unreadable, so I used var_dump instead...
Comment by
WanWizard
May 2014
permalink
Who to execute this using DB::query() method
I used this code to test your query here (using 1.8/develop of the framework core): public function action_union() { $cats = array('COMPUTERS', 'ELECTRICAL', 'MATHEMATICS', 'CHEMISTRY', 'E…
Comment by
WanWizard
May 2014
permalink
Modules
If this is too difficult for you, I don't know where to start. The Modules page in the documentation describes - what (in the context of FuelPHP) a module is - how you configure the framework to use modules - the module namespace - the module …
Comment by
WanWizard
May 2014
permalink
Modules
Modules extend or make the application modules (the frontend), Packages extend the framework (the backend). In a truly modular system, you need both. I have for example a package for pdf generation (https://github.com/WanWizard/fuel-pdf), that I si…
Comment by
WanWizard
May 2014
permalink
Learning FuelPhp
For starters you need to know object oriented PHP. There are tons of books about the subject, but in my experience nothing beats getting your hands dirty and start coding. You'll learn quicker from your mistakes than from books. To be able to …
Comment by
WanWizard
May 2014
permalink
Building library
Namespaces and traits are generic PHP, and not specific to FuelPHP. So you can read anything you like. With regards to external classes, Fuel supports everything Composer can throw at you (just add it to the composer.json and run an update), and yo…
Comment by
WanWizard
May 2014
permalink
Best way for a stylish Form?
You can always use fieldset, the question is what you can automate with it. With forms this complex, you probably have to create the structure manually (like it is done now, and replace the input fields with individual echo $fieldset->build(…
Comment by
WanWizard
May 2014
permalink
how to set conditions to _has_many
You found a bug. I have fixed it in 1.8/develop, the fix will be part of the 1.7.2 release. If you need it you can backport fuel/core/classes/database/query/builder/join.php to 1.7.1 without problems.
Comment by
WanWizard
May 2014
permalink
ViewModel get data from Controller
With regards to data the API of the Viewmodel class is the same as for the View, so you can use the set(), set_safe() and get() methods to send data to it, or get data from it. Or use bind() to bind a variable by reference. And it also supports the …
Comment by
WanWizard
May 2014
permalink
Acessing Viewmodel from Controller
Docs are correct, the standard is ucfirst(), so it is "Viewmodel", not "ViewModel". The problem was that: a) the class itself is wrongly named ViewModel (for historic reasons, and never corrected) b) the autoloader was case-sens…
Comment by
WanWizard
May 2014
permalink
Acessing Viewmodel from Controller
Was a bug in the autoloader, I have just fixed it in 1.8/develop. If you're on 1.7.x, you can just backport it from the repository.
Comment by
WanWizard
May 2014
permalink
Acessing Viewmodel from Controller
I need to check where the class name issue comes from. Fuel standard is that classnames are ucfirst(), so the docs are correct. But I see the welcome controller use ViewModel, which is odd...
Comment by
WanWizard
May 2014
permalink
Acessing Viewmodel from Controller
I gave you an example a view posts back?
Comment by
WanWizard
May 2014
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
4:01PM
Roles
Administrator