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
Default integer value in ORM
You will have to define the default on the $_properties array. The ORM doesn't read back defaults from the table definition.
Comment by
WanWizard
May 2012
permalink
custom routing (username in URL)
I understand what you want. I just want to know how you think you're going to tell the routing engine what a username is, how to determine if one is valid, and continue processing routes if it's not valid. You could work around it by usin…
Comment by
WanWizard
May 2012
permalink
custom routing (username in URL)
It does. Routes are processed in the order that they are defined. You need to define the correct ones in the proper order. If you define one with a variable, how would the framework know that you don't want it to match certain URL's? The …
Comment by
WanWizard
May 2012
permalink
Autoloader custom directories in APPPATH
You don't need to. Anything in classes can be loaded by the autoloader as long as you follow the rules. And the examples you give do that, so they should be loaded without problems. If they are in the global namespace, the class name would be …
Comment by
WanWizard
May 2012
permalink
some doubts
As far as I can see in the code, conditions do not support 'or_where'. at the moment. You can create a feature request for that if you want: https://github.com/fuel/orm/issues, no guarantees it will be picked up though.
Comment by
WanWizard
May 2012
permalink
Simple upload script failing.
Your form doesn't have the enctype needed to upload files. The errors are a result of not capturing the fact that no files were uploaded. I've fixed that.
Comment by
WanWizard
May 2012
permalink
Whats the easiest way to check if object has record in many-to-many relation?
For those who haven't done that: use the is_fetched() method and a count on the object. if ($model->relation->is_fetched() and count($model->relation)) { // there are related records loaded } This will NOT trigger a load. If …
Comment by
WanWizard
May 2012
permalink
some doubts
If your related model is in a different namespace, you have to define it in the relation fully namespaced, minus the leading backslash. 'model_to' => 'Module\\Model_Name', If you want the see SQL being executed, you can ac…
Comment by
WanWizard
May 2012
permalink
no layout class
I don't think it's easy to get it to work on 1.1/release, too much has changed. In the 1.1/release template controller you can disable auto rendering of the template by setting the class property "$auto_render" to false.
Comment by
WanWizard
May 2012
permalink
Image class - watermark padding always 0 when using imagemagick driver
Please create an issue for this at https://github.com/fuel/core/issues so someone can have a look at it.
Comment by
WanWizard
May 2012
permalink
how to load model in test? and how to load and test controller ?
Is the module loaded? When you request it through the URL, the routing engine will load the module for you, but for a test you have to load it manually. \Module::load('adm'); In the setup of your test class.
Comment by
WanWizard
May 2012
permalink
fuel forum module
well, this forum is very simple. Forums, one access group per forum, topics per forum, simple reply on a topic, end of story. If you look at other forums, you will see a lot more functionality, like granular access, moderator functions, better pars…
Comment by
WanWizard
May 2012
permalink
Lots of resources in rest controller
If you create a folder called 'api' in which you have multiple controllers, that would translate to URI's like '/api/controllername/...' which implements the split of controllers without any further action needed.
Comment by
WanWizard
May 2012
permalink
FuelPHP success story: the tale about Kohana's memory leak
Interesting observation. But no closer to what's causing it. If you can run this interactively (i.e. through a browser request), you could record an xdebug trace and analyze it for memory usage through cachegrind.
Comment by
WanWizard
May 2012
permalink
Web site list -> Powered by fuelphp
Technically there is no need to. But it allows your site to be identified, as you can see. It is up to you to decide if that bothers you...
Comment by
WanWizard
April 2012
permalink
How to manage an oil generated app with GIT
There are a lot of pitfalls when using submodules, so read carefully before you decide to use them. One major pain is that a submodule can not point to a branches HEAD, it always points to a commit hash. So it you have your app (which is either a c…
Comment by
WanWizard
May 2012
permalink
result index is always primary key value?
This is by design: the array index == the id.
Comment by
WanWizard
May 2012
permalink
fuel forum module
Not that I know of. I've made one for my CMS in the past, and it's an awful lot of work to make a decent one. Or are you looking for something very basic, like this one?
Comment by
WanWizard
May 2012
permalink
ErrorException [ Error ]: Class 'Controller_TemplateExt' not found
As per the docs (see coding standards), all filenames in FuelPHP HAVE to be lower case. The only exception to this rule are packages that contain vendor libraries and run in PSR-0 mode.
Comment by
WanWizard
May 2012
permalink
Debugging data flow inside core request/response
It is a security feature, and therefor enabled by default. Which means you have to think and make a conscious descision to pass data to the view unencoded (and therefore potentionally insecure). It's like a firewall, which should have a defaul…
Comment by
WanWizard
May 2012
permalink
Debugging data flow inside core request/response
You have to be a bit careful with ORM objects in combination with output filtering. Depending on the structure and the data, it might lead to a lot of conversions. So yes, either disable output filtering on ORM objects (disabling it globally is NOT…
Comment by
WanWizard
May 2012
permalink
Routes don't need to match exactly?
Daniel 15, Deal with that in your rewrite rules, it's a lot quicker and less complex then doing it in FuelPHP. As I said, FuelPHP is like many other frameworks URI segment driven, the extension is not used, irrelevant and discarded. If you ins…
Comment by
WanWizard
May 2012
permalink
Debugging data flow inside core request/response
That is a simple query (SELECT * FROM table ORDER BY field ASC) that is executed immediately. If that takes 2,5s to complete on a resonable machine, then either your database table is huge or you're not using indexes (or both). Note that ORM h…
Comment by
WanWizard
May 2012
permalink
Wierd results from find method
Ah, find('first') runs a get_one() query. If you combine get_one()'s with relations, the design of the ORM will ensure you get consistent data. It refuses to run a JOIN on a has_many relation with a limit, as that would probably mean…
Comment by
WanWizard
May 2012
permalink
Wierd results from find method
Have you activated the profiler to see what queries are generated by your loop?
Comment by
WanWizard
May 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,408
Last Active
4:06PM
Roles
Administrator