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
REST controller, returning a PLIST
REST controllers only auto-convert results if your REST method returns an array. So if you create the XML yourself (PLIST is a rediculous format which is not supported by the Format class) and return it as a string, the REST controller will send th…
Comment by
WanWizard
June 2012
permalink
404 not found
"public" should never be part of the URL, so this URL is wrong unless your controller is called "blog", it has a method called "action_public", and "articles" is passed as a parameter to it. Did you install F…
Comment by
WanWizard
June 2012
permalink
Own Pagination.
The current pagination class expects a pagination_url in the form "
Comment by
WanWizard
June 2012
permalink
HMVC request to a Rest Controller?
Those are two different issues. In the first case, URI requests go to action_methodname, REST calls go to get_methodname, post_methodname, etc. And if those not exit, it will fall back to action_methodname. In normal cases you can't call REST …
Comment by
WanWizard
February 2012
permalink
how to set Pagination params auto?
You load a pagination config via set_config(), which you pass an array of configuration values. You need 'pagination_url' to set the pagination base URL. Which is documented here: http://docs.fuelphp.com/classes/pagination.html. May I sug…
Comment by
WanWizard
June 2012
permalink
unserialize not work in a view file
When you post a question, try to explain what you did, what you expected, what didn't work, and what the result was. I can't do much with "it doesn't work". But my guess is that when you pass data to a view, it gets escaped…
Comment by
WanWizard
June 2012
permalink
Enumerations with scaffolding, migrations, and ORM
Looks like a bug in the PDO connection driver, $like doesn't have any regex delimiters added to it. I've committed a fix for this.
Comment by
WanWizard
May 2011
permalink
Extra property in Many to Many relation
You can do the same in FuelPHP's ORM by defining a model for the relationship table, so it becomes an object like all others... So instead of Model_A has_many Model_B, Model_B has_many Model_A you will have Model_A has_many Model_AB, Model_AB…
Comment by
WanWizard
November 2011
permalink
Redis sample implementation?
** move to general, this is not a "tip" or "trick" **
Comment by
WanWizard
June 2012
permalink
Using Fuel::load()
Fuel::load() does a plain include of the file. As you don't pass a fully qualified path name, it will be loaded relative to the current directory, which is the directory your index.php is in.
Comment by
WanWizard
June 2012
permalink
custom routing (username in URL)
If you need logic to determine which action method in your controller needs to be called, you should implement the router() method in the controller. It will capture all calls to the controller, and has access to the segments in the URL and the met…
Comment by
WanWizard
May 2012
permalink
validate for upload,show be a bug,i put value to $_POST.
File fields are not part of $_POST, they are in $_FILES. And validation doesn't run on $_FILES, you need to Upload class for that.
Comment by
WanWizard
June 2012
permalink
Hybrid Controller, how to know if its using its template or rest interface
The template is meant to make it easier to produce webpages from browser requests. In general, this is not what you want, you want to return json, xml, or perhaps a snippet of HTML. So the REST controller doesn't support templates. The Hybrid …
Comment by
WanWizard
June 2012
permalink
I like what I see, but is FuelPHP right for me?
Then you're absolutely in the right place. And "hints" of a CI past are possible, after all, all FuelPHP core developers (probably with the exception of Frank) have a hard-core CI background. We started FuelPHP for exactly the same r…
Comment by
WanWizard
June 2012
permalink
ErrorException [ 4096 ]
You can't have both. As both columns and relations are properties of the model object, it is either a column or a relation. And a column has preference over a relation. So you're trying to assign a model object to a column property, which…
Comment by
WanWizard
June 2012
permalink
Use include()
You have to be more specific, I have no idea what you mean.
Comment by
WanWizard
June 2012
permalink
Error with
That depends. That will fetch the array of all validation error objects. You will have to iterate over it in the view, and apply the styling. The other option is to pass the validation object to the view, and then use show_errors() to display them.…
Comment by
WanWizard
June 2012
permalink
how to set diffrent config for $_FILES,
The Upload class processes the entire form as a whole. If you need individual processing for fields, use callback methods that contains your custom validation code.
Comment by
WanWizard
June 2012
permalink
I like what I see, but is FuelPHP right for me?
If your question is "is FuelPHP ready for enterprise applications", then the answer is "absolutely". We don't do anything but, enterprise (intranet) applications is our core business, and we've been using FuelPHP for t…
Comment by
WanWizard
June 2012
permalink
ErrorException [ 4096 ]
From the error it looks like ->category is seen as a column name, and not as a relation?
Comment by
WanWizard
June 2012
permalink
ErrorException [ 4096 ]
** moved to the ORM forum **
Comment by
WanWizard
June 2012
permalink
Error with
The factory() methods were deprecated in v1.1, and removed in v1.2. See the changelog: https://github.com/fuel/core/wiki/Changelog-v1.2
Comment by
WanWizard
June 2012
permalink
Event class example
That'll be me, yes.
Comment by
WanWizard
June 2012
permalink
Event class example
The request is called from your index.php, so perhaps that's the place to do it. Otherwise, you can use the Event class to register a shutdown function: \Event::register('shutdown', 'Myclass::mymethod'); which will call th…
Comment by
WanWizard
June 2012
permalink
Recommended GIT setup for development
If you look at the FuelPHP components, you have the "fuel" repository, which is your application, and the submodule repositories, which are part of the FuelPHP core code. Assuming you have your own repositories somehwere (let's assum…
Comment by
WanWizard
June 2012
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,373
Last Active
6:26PM
Roles
Administrator