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
Unexpected behavior using find_by_pk and find_by_*
I'm not often in your neck of the woods, but I keep it in mind... :-)
Comment by
WanWizard
June 2013
permalink
Autoloader doesn't find sub-directory classes in module directories
You're welcome, happy coding! ;-)
Comment by
WanWizard
June 2013
permalink
Unexpected behavior using find_by_pk and find_by_*
Fixed!
Comment by
WanWizard
June 2013
permalink
Unexpected behavior using find_by_pk and find_by_*
Hmm... I'll have a look.
Comment by
WanWizard
June 2013
permalink
Autoloader doesn't find sub-directory classes in module directories
That should work fine, I don't see why not. Note that if you want to use this in other modules (such as members), you need to make sure the module is loaded first, otherwise the autoloader doesn't know where the "Modules" namesp…
Comment by
WanWizard
June 2013
permalink
Modules inside packages
It would be better to do that in deployment and not bother the frontend with it. Every time we deploy (push to staging or production), we also run all migrations. We would put the copy in a migration file. Well, we would probably create a symlink,…
Comment by
WanWizard
June 2013
permalink
Unexpected behavior using find_by_pk and find_by_*
Think i fixed it. A query like this: \Model_Test::find_by_id_and_username_or_email_and_group_id(10, 'test', 'test', 999);Now comes out like this: SELECT `t0`.`username` AS `t0_c0`, `t0`.`email` AS `t0_c1`, `t0`.`group_id` AS `t…
Comment by
WanWizard
June 2013
permalink
Unexpected behavior using find_by_pk and find_by_*
SELECT `t0`.`name` AS `t0_c0`, `t0`.`slug` AS `t0_c1`, `t0`.`created_at` AS `t0_c2`, `t0`.`updated_at` AS `t0_c3`, `t0`.`major_id` AS `t0_c4` FROM `majors` AS `t0` WHERE ((`t0`.`slug` = 'slug-from-uri') AND (`t0`.`major_id` = 'slug-fr…
Comment by
WanWizard
June 2013
permalink
Unexpected behavior using find_by_pk and find_by_*
p.s. You can use "find_all_by_*" to run an "all" query, instead of a "first" query...
Comment by
WanWizard
June 2013
permalink
Unexpected behavior using find_by_pk and find_by_*
Looked into it a bit further. I think not all methods defined in the Query class are available as options in the constructor, because they don't really make sense. The or_where is a perfect example, a combination of where clauses with AND or …
Comment by
WanWizard
June 2013
permalink
Unexpected behavior using find_by_pk and find_by_*
I would not call it a bug. Model_Crud and ORM are made by two different people. In case of Model_Crud, a find_by simply returns all results, in ORM a find_by always implies a get_one(). It's debatable whether or not that is a good thing (I do…
Comment by
WanWizard
June 2013
permalink
Error on View Load
"view" contains ViewModel classes, and is therefore inside the classes folder, otherwise the autoloader can't find them. views are plain text files, and therefore don't belong into classes...
Comment by
WanWizard
June 2013
permalink
Modules inside packages
Assets have to by inside the docroot, otherwise a browser can't fetch them. If you leave them outside, you'll need a piece of PHP to fetch the file and output it (which adds overhead). Extensions to both Asset and Theme are not going to s…
Comment by
WanWizard
June 2013
permalink
FuelPHP Developer or team to hire
Yes, we can. And this is it's first post! :-)
Comment by
WanWizard
June 2013
permalink
Can it use Session class without cookie?
You are absolutely right, don't know where that went. It's not that dangerous, first the have to guess (or steal) the session id hash, and once they have a valid one, get passed all security checks that are done server side (on IP and use…
Comment by
WanWizard
June 2013
permalink
download documentation
Not that I know of. But it's plain HTML, so perhaps there are tools avaiable that can do that.
Comment by
WanWizard
June 2013
permalink
Handling lots of PUT requests with urlencoded data
Also added support for plain id strings, so you can now use Session::key(), in GET, POST and the HTTP header, no more need to do crazy array serialization stuff...
Comment by
WanWizard
June 2013
permalink
Handling lots of PUT requests with urlencoded data
I always work on 1.7/develop, and that has the headers() method. It has a workaround for fastcgi and nginx. If the concept works I'll commit it to 1.7/develop.
Comment by
WanWizard
May 2013
permalink
Unexpected behavior using find_by_pk and find_by_*
You can't really make them 100% compatible without breaking stuff, and we don't break BC in minor releases. Model_Crud's methods take different arguments. In Orm, find_by defaults to 'first', returning only one result, in M…
Comment by
WanWizard
May 2013
permalink
Unexpected behavior using find_by_pk and find_by_*
Orm\Model and Model_Crud are from two different authors. We've been busy over the last releases to unify the API, but obviously there are still differences. Never knew "find_by_pk" existed... I'm pretty sure OrmModel doesn'…
Comment by
WanWizard
May 2013
permalink
Handling lots of PUT requests with urlencoded data
Input doesn't check the content type at the moment. I have no option to test this at the moment, if you change the hydrate() method in the Input class to this, does it fix it? protected static function hydrate() { static::$inpu…
Comment by
WanWizard
May 2013
permalink
Can it use Session class without cookie?
when you use POST, you need to set the "post_cookie_name" configuration value. The reason this doesn't use the cookie name is that often you want to use POST in combination with cookies (for example if you use certain file uploaders…
Comment by
WanWizard
May 2013
permalink
Modules inside packages
I personally don't use modules in packages, I keep a strict separation between "frontend" or "application" logic (i.e. modules) and "backend" logic (i.e. packages). That doesn't mean you can't design you…
Comment by
WanWizard
May 2013
permalink
'valid_string' rule is not correctly Fieldset add()
Misread your question. The correct syntax is: $fieldset->add('fullname', __('users.form.fullname'), array(), array('required', array('valid_string', array('alpha','spaces')))); So th…
Comment by
WanWizard
May 2013
permalink
Corss Loading ViewModel Modules Not Work
You can't. The Viewmodel doesn't support hardcoded modules. And that is not on the roadmap either, calling cross-context is a bad idea, it creates tight coupling between modules, which negates the reason for making stuff modular in the fi…
Comment by
WanWizard
May 2013
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
11:42AM
Roles
Administrator