Please upgrade here. These earlier versions are no longer being updated and have security issues.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.
Some questions while poking around in controllers, models, and forms...
ddumont
✭✭
I see the rest style passing of parameters to the controllers and how that gets handled with the arguments to the particular controller method, but what about posting large amounts of data? or multi-part mime?
How can I read in data that's been posted that way, or by url args? file parts from a mime post?
How can I read in data that's been posted that way, or by url args? file parts from a mime post?
There was an error rendering this rich post.
0
Comments
In orther words: it works by magic ;-) I do all those things you describe, but I have never had to explore the details of how it actually works.
A good place to start is here, though this is by means comprehensive:
http://www.vanillaforums.org/docs/models
My goal is to not have a visual form but to create a back-end service for another application.
I'm about half way deep into forms now... I might create a model to see what kinds of things it will magically handle for me w.r.t. sql inserts. The documentation says models represent tables... I need to know if it's a 1:1 relationship, or if I can have a model that spans tables... and how that all works...
There was an error rendering this rich post.
There was an error rendering this rich post.
Am I all set creating a new Gdn_Database with my own config? What's the best way to do this?
There was an error rendering this rich post.
There was an error rendering this rich post.
I just want to make sure i'm not overly creating or underly creating database objects...
I'm not really solid on the lifecycle of controllers.... and I'm not very proficient in php either
There was an error rendering this rich post.
In a model, you simple use $this->SQL As long as your model extends Gdn_Model (it should) you'll "magically" have an SQL object ready to use.
I want to target another one.
I also have tried using the model concept and it's a bit too restrictive for me as implemented. I'm actually not writing a UI, so the separation doesn't really apply so much here.
There was an error rendering this rich post.
There was an error rendering this rich post.
@Tim, @Todd, @Mark How might I do that?
There was an error rendering this rich post.
(lifted from HtmLamed)
There was an error rendering this rich post.
Just getting back to this now. I've been looking at the factory stuff in vanilla, and I'm a tad confused. This looks like every time I register a factory, it will redefine it and blow away any previous definition.
I'm still struggling to understand the lifecycle of variables in php. Is there no way to create and reference a singleton across all requests? In java I could have a static class member that all transaction threads could reference.
@Todd can you shed any light on this?
There was an error rendering this rich post.