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.
Jelmer Schreuder
Fuel core developer, check my bio on the about page.
Discussions
1
Comments
792
Activity
hooks
You're asking the question the wrong way around. The question shouldn't be "how can I imitate CodeIgniter?", but it should be "how to best solve this in Fuel?". In this case you'd best write a core Controller exte…
Comment by
Jelmer Schreuder
July 2011
permalink
syntax to specify default field values
Are you on RC3? This has only been in as of RC3, RC2 did not yet support default values.
Comment by
Jelmer Schreuder
July 2011
permalink
syntax to specify default field values
hmmm, that's weird - that should work fine. Are you sure you're not overwriting the initial value with "null" yourself?
Comment by
Jelmer Schreuder
July 2011
permalink
mysql functions
Model_Pages::find('all',array('where'=>array(DB::expr('MONTH(publish_data)'), '
Comment by
Jelmer Schreuder
July 2011
permalink
Wrong named file / class may cause problems with loading?
Multi-file third party libs often come with their own autoloader or are best included using include/require. We put those into a "vendor" dir when we do this ourselves (check out core/vendor for example). Those are libs that are outside t…
Comment by
Jelmer Schreuder
July 2011
permalink
Wrong named file / class may cause problems with loading?
The error is caused when the autoloader can't find the class, will have nothing to do with it being abstract as the process doesn't care about instanciating it. Filepaths in fuel are fully lowercased and each underscore is translated into…
Comment by
Jelmer Schreuder
July 2011
permalink
Could the parser parse a module?
The Parser package itself does little, it's just an interface to allow you to use template parse libraries for Views instead of normal PHP. Thus if this is possible with SimpleTags, Mustache, Dwoo, Smarty, Twig, Haml or Jade: yes. So I guess t…
Comment by
Jelmer Schreuder
July 2011
permalink
deleting relations
You can delete relations in all directions, the Orm will handle orphaning all the children. One warning is that you can't use a primary key as a foreign key as well, a primary key cannot be changed once it's been set (for data integrity …
Comment by
Jelmer Schreuder
June 2011
permalink
Fieldset, Validation (and ::Form)
The Fieldset class is used to model fields with rules, properties, values, etc. The Form class can turn a Fieldset instance with its field objects into a HTML Form. While the Validation class uses the Fieldset instance to know which fields to check…
Comment by
Jelmer Schreuder
July 2011
permalink
How Does Instance Function Work?
To add a little bit to what WanWizard already said: We're using 2 patterns here, mixed in with some bits of a third: 1. Factory Pattern 2. Multiton Pattern 3. Singleton Pattern *light* The factory pattern is used to create NEW objects, espec…
Comment by
Jelmer Schreuder
June 2011
permalink
CMS can not be this easy!
Any such functionality will require some implementation and overhead. It's uneccessary to add the overhead for everyone, and for implementation you can choose between the 404 method and the Route extension method. I think that's more tha…
Comment by
Jelmer Schreuder
April 2011
permalink
CMS can not be this easy!
If you want something like that you can extend the Route class (note the lack of an "r" at the end) and add an instance of your own Route type to the routes. This will allow you to "catch-all" within that Route object or still r…
Comment by
Jelmer Schreuder
April 2011
permalink
ORM not working?
Try this instead: Model_Article::query()->get(), if that does work there's a weird problem. And if that doesn't work: echo Model_Article::query()->get_query() - it will return a database_query object but when you echo it it will out…
Comment by
Jelmer Schreuder
June 2011
permalink
Something like [controller]/_404_ ?
Create a router() method and take care of your own in-controller routing. Described in the docs.
Comment by
Jelmer Schreuder
June 2011
permalink
ORM not working?
Doubt it, many will have similar test setups.
Comment by
Jelmer Schreuder
June 2011
permalink
ORM Cache?
If you use Model::find($id) it won't be fetched twice, when done like your example it will be fetched again. That is because when using find() with a primary key value it checks whether it was fetched already. But when using Model::find_by_id(…
Comment by
Jelmer Schreuder
June 2011
permalink
Many to many and other question about ORM
You can't fetch values from the in-between table, if you want that you need to create a model in between and fetch the relations nested. Like this: Model_User has many Model_Tool_Users Model_Tool has many Model_Tool_Users Model_Tool_User belo…
Comment by
Jelmer Schreuder
June 2011
permalink
ORM not working?
Are you sure there's any data in your table? All of this looks fine.
Comment by
Jelmer Schreuder
June 2011
permalink
Should Asset::css returning Fuel_Exception?
I wouldn't exactly call that an "interesting approach", I'd call it basic PHP. Also, I agree with most of the pro-exception arguements above: CSS isn't optional, neither is Javascript. They're critical parts and in mos…
Comment by
Jelmer Schreuder
June 2011
permalink
Many to many and other question about ORM
- I'm currently trying Fuel and don't find anyway to delete a many to many relation ? I have a model user with a many to many relation to tool model Easy: fetch the relationship and delete the ID of the relation you want removed from …
Comment by
Jelmer Schreuder
June 2011
permalink
Retrieve file informations with file handler
Actually I'm not sure if I agree here. The file class is in part about creating a more logical interface to PHP's web of inconsistent and not always logical named functions/methods. This might be worthwhile addition, though I'd have …
Comment by
Jelmer Schreuder
June 2011
permalink
Documentation Standards
The first one is wrong, it should be:
Comment by
Jelmer Schreuder
June 2011
permalink
Autoloading class on FuelPHP needed
I tried to explain last night on IRC, but utterly failed to get it through to you - probably because of a language barier. I'll give it another shot now. First off, your topic title is nonsense: "Autoloading class on FuelPHP needed" …
Comment by
Jelmer Schreuder
June 2011
permalink
Global Usage of Lang Files
If it's a random class and not a controller the method used must be _init(), the before() method only works with Controllers and ViewModels. _init() is like a constructor (__construct()) and is executed by Fuel automaticly when the class is lo…
Comment by
Jelmer Schreuder
June 2011
permalink
ErrorException [ Error ]: Class 'Model_Group' not found
That does look like a bug, though if you already knew about it why didn't you report it on https://github.com/fuel/oil/issues ? Also moved the discussion to the Oil forum as it's about Oil, not the Orm.
Comment by
Jelmer Schreuder
June 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
Jelmer Schreuder
Joined
January 2011
Visits
7
Last Active
May 2016
Roles
Administrator