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
Batch Insert using ORM
Yes, the ORM is made for object interaction. Don't try to force all database I/O through an ORM model. In some cases it's a lot more efficient to simply use DB calls. If you insist, then yes, you'll have to create ORM model objects i…
Comment by
WanWizard
June 2011
permalink
Problem with File::read_dir when using area
Issue has been fixed in the develop branch of Fuel/core.
Comment by
WanWizard
June 2011
permalink
Problem with File::read_dir when using area
You've bumped into a bug. The first time read_dir() is called, you pass it a path, relative to the area's basedir. When you use depth, it calls itself recursively, but with an absolute path, which fails, because the basedir always gets pr…
Comment by
WanWizard
June 2011
permalink
Widgets advice
My widgets are all produced by module controllers, which I call through a Request object. This allows you to code your widgets completely independent of your application code, making them very reusable. I've got this information in t…
Comment by
WanWizard
June 2011
permalink
Multiple sites utilizing the same application, loading configurations from the database.
This is how my project, ExiteCMS works. It serves multiple sites from a single backend. All requests are routed to the bootstrap controller. It does a lookup in the sites table using the hostname. If found, it uses the URI segments to locate the pa…
Comment by
WanWizard
June 2011
permalink
Correct utilization of db calls within controllers.
I use Viewmodels for "list" type screens. My controller takes care of the specifics (like which page, which columns, how many rows, etc), the Viewmodel does the rest. See http://fuelphp.com/docs/general/viewmodels.html.
Comment by
WanWizard
June 2011
permalink
Parser problem with View location hardcoding
Haven't looked at Parser, and I'm not sure what the current state of the project is. Maybe Jelmer can comment...
Comment by
WanWizard
June 2011
permalink
Multiple sites utilizing the same application, loading configurations from the database.
So? It's a class, you can call it from anywhere. Same for configuration variables, if they're static, store them in a config file. If they're dynamic, use a static class. You can even put code in a config file if you so desire, as lo…
Comment by
WanWizard
June 2011
permalink
Question in Quora, what is FuelPHP?
Did you write this, or did you bump into it?
Comment by
WanWizard
June 2011
permalink
Module loading
Yes, explicit module loading (the "module::") is only available as of RC3.
Comment by
WanWizard
May 2011
permalink
Multiple sites utilizing the same application, loading configurations from the database.
Pre-loading happens in Fuel::init(), just after the environment has been setup. Add your class to the "always_load, classes" section of app/config/config.php, and put any initialisation code in a static method called _init(). This is beca…
Comment by
WanWizard
June 2011
permalink
PHamlP Integration?
The parser package is a skeleton (in the works!) in which you can plugin multiple template parsers. If you're going to build a package, it would be handy to make it compatible with the Fuel parser.
Comment by
WanWizard
June 2011
permalink
PHamlP Integration?
As this is about 'core' code, and not about user facing code, it should be a package.
Comment by
WanWizard
June 2011
permalink
Multiple sites utilizing the same application, loading configurations from the database.
Have you tried it?
Comment by
WanWizard
June 2011
permalink
Module loading
What doesn't work? Any error messages? If not, can you describe what does happen? A \View::factory('module::viewname') loads the view explicitly from the module, no matter where you call it from. So if that doesn't work, you mig…
Comment by
WanWizard
May 2011
permalink
Can someone explain what the Auth package does behind the scenes?
The 'simple' drivers are just there as an example for acl, group and user handling, and to provide a very simple auth function for applications that don't require more. The entire idea of the Auth package is that you extend it's…
Comment by
WanWizard
June 2011
permalink
Module loading
That is a very good question. The context in which the cascading file finder works is based on the current request object. In case of events (which are callbacks), you haven't got a clue what the current context is, the event can be triggered …
Comment by
WanWizard
May 2011
permalink
Fuel autoloading module/model throws exception
You shouldn't add the slash when loading the class from the current namespace. I wouldn't use the 'use' keyword, as that would import everything into the current namespace, negating the reason why Fuel uses namespaces in the fir…
Comment by
WanWizard
June 2011
permalink
new to frameworks, some questions about structure and session control
As to your first question, create it as a static class, and store in in app/classes. You can then simply access it from any controller/model/view using a static call ( class::method(); ). Fuel will take care of loading it when needed. Sessions get …
Comment by
WanWizard
June 2011
permalink
profiler replacement ?
I agree that overlapping content can be annoying sometimes. Add a feature request on http://github.com/fuel/core/issues, so someone can have a look.
Comment by
WanWizard
June 2011
permalink
profiler replacement ?
What's wrong with it? It gives you more profiling information than CI's profiler. And you can always extend or replace the Profiler class and write your own.
Comment by
WanWizard
June 2011
permalink
session question
That only happens if you load the Session class, which the welcome controller doesn't do. It get's loaded if you specify it as autoload in your app's config, or as soon as you call one of the static methods.
Comment by
WanWizard
June 2011
permalink
any news on rc3 ?
How do you create the database connection? When the DB class creates an instance, it will - load the db config file - if no named instance is loaded, it gets db.active from the config - if no instance by that name exists, it fetches the config (…
Comment by
WanWizard
May 2011
permalink
any news on rc3 ?
By default, it will load the database defined as 'active', which you define here as Config::get('environment'). What's defined there?
Comment by
WanWizard
May 2011
permalink
any news on rc3 ?
I assume that's the same error? 'dev' has been changed to 'development'...
Comment by
WanWizard
May 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,389
Last Active
12:48AM
Roles
Administrator