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
Opauth problem
I'm not an Opauth expert, I can only say how it is implemented in the app here. We only have one client app that has Facebook integration. The Fuel Opauth class does allow a callback_url to be defined in the config that is passed to the class.…
Comment by
WanWizard
February 2016
permalink
There is no security.output_filter defined in your application config file
I still don't understand what you think the problem is, and why you want to edit COREPATH? And if you would want to, why that is a problem. COREPATH is defined in both the oil script in the installation root, and the index.php in the public fo…
Comment by
WanWizard
February 2016
permalink
There is no security.output_filter defined in your application config file
You get this error when Security class is loaded before the global config is loaded. Easiest is to add a echo Debug::backtrace(); to Security::_init() to see what triggers the load.
Comment by
WanWizard
February 2016
permalink
Creating New Propert from Observer
I do wonder however what your use-case is, and why you can't use the standard custom data values? Since $model->new_field = 'value'; simply works?
Comment by
WanWizard
February 2016
permalink
Creating New Propert from Observer
It might be even enough just to define the property: public $new_field = null; in the class, as property existence will not trigger the magic setters and getters.
Comment by
WanWizard
February 2016
permalink
Creating New Propert from Observer
Create a setter method in your model: public function set_new_field($value) { $this->new_field = $value; }
Comment by
WanWizard
February 2016
permalink
Creating New Propert from Observer
You can't without creating a setter method for it. The Model uses a data container in combination with magic setters and getters, so if you do $model->new_field, it will create a new property in the "custom data" container, not a …
Comment by
WanWizard
February 2016
permalink
How to remove attached string from HMVC response body.
It's probably better you give it a toArray() method, so you can pass an array back, and set the format for the REST controller to json. The controller will then take care of the conversion and the correct result.
Comment by
WanWizard
February 2016
permalink
How to remove attached string from HMVC response body.
Next time just give the complete story, so I don't have to guess as to the cause... ;-) The error message is generated by the REST controller, and caused because it can't process the data being passed to return: https://github.com/fuel/co…
Comment by
WanWizard
February 2016
permalink
Upload w/ new name
If you define a new name, it will be saved with this new name. If you want to execute runtime operations of the filename (or other options), you will have to use a "before" callback (if you are using the Fuel Upload class) or a "befo…
Comment by
WanWizard
February 2016
permalink
Opauth problem
Are you using Opauth directly, or are you using Auth's Opauth integration? To change the callback, you have to login to the facebook developer website, select your app from the "My apps" dropdown, and then on the left select the &quo…
Comment by
WanWizard
February 2016
permalink
How to remove attached string from HMVC response body.
REST controllers do not have presenters or views? A REST controller should return a JSON response?
Comment by
WanWizard
February 2016
permalink
DB::Query results values is all string type
The PHP MySQL driver returns all values as string, so that is outside the framework's control. There is no typing option for low-level DB queries, you'll have to handle that in your model.
Comment by
WanWizard
February 2016
permalink
problem routing with dot (like mysite/user.name)
It doesn't do that, because it sees the ".name" suffiix as the URL extension. And you can't route on extensions.
Comment by
WanWizard
February 2016
permalink
Handle 403 response on HMVC request
In case of an HMVC call, the exception will just bubble up. So use something like this in your controllers: try { $hmvc = \Request::forge('some/hmvc/url'); } catch (\HttpNotFoundException $e) { // handle the fact that the reques…
Comment by
WanWizard
February 2016
permalink
Insert multiple rows with DB::insert
BTW, Fuel doesn't open and close the connection for every query. It opens the connection when you execute the first DB command, and doesn't close it until the connection object is destroyed, which happens on shutdown. Assuming you don…
Comment by
WanWizard
January 2016
permalink
Insert multiple rows with DB::insert
->columns(array( 'col1', 'col2', ))->values(array( array('row1val1', 'row1val2'), array('row2val1', 'row2val2'), )); And so on should work fine.
Comment by
WanWizard
January 2016
permalink
Convert Core Controller to Hybrid
Looked up the 1.6 codebase: The line that gives the error is: // Some Methods cant have a body $this->request->body = null; which means $this->request does not contain a valid request object. Which is very weird, since th…
Comment by
WanWizard
January 2016
permalink
Convert Core Controller to Hybrid
The Hybrid controller is a combination of the Template and the Rest controller. If the Base would have used Template, then the swap would have been easy and painless. But you say the Base controller currently extends \Controller, it makes things mo…
Comment by
WanWizard
January 2016
permalink
Informix Database
You can tell PDO to return in lowercase using: PDO::ATTR_CASE => PDO::CASE_LOWER You can pass it to the PDO constructor in _connect() like is done here with the compress attribute: https://github.com/fuel/core/blob/1.8/develop/classes/datab…
Comment by
WanWizard
January 2016
permalink
Informix Database
weird, is that a driver bug? Or are all column names in Informix uppercase?
Comment by
WanWizard
January 2016
permalink
Best way to insert related items into DB
No, it's the name of the relation between the parent and the child model.
Comment by
WanWizard
January 2016
permalink
Best way to insert related items into DB
You can do that in one go: // create a parent $parent = Model_Parent::forge(array('column' => 'value')); // add some children $parent->child[] = Model_Child::forge(array('column' => 'child1')); $par…
Comment by
WanWizard
January 2016
permalink
Informix Database
Question: does this make any sense to you guys? http://code.activestate.com/recipes/576621/ The Informix PDO connection driver needs a custom list_tables() and list_columns() I think...
Comment by
WanWizard
January 2016
permalink
302 Redirects with SimpleAuth Login
You're welcome! :-)
Comment by
WanWizard
January 2016
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,369
Last Active
8:06PM
Roles
Administrator