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
Full text search in DB class or ORM?
I see BTW that none-PDO drivers don't have this method, so it's not very consistent.
Comment by
WanWizard
February 2017
permalink
Full text search in DB class or ORM?
No, as it is (very) platform specific. And as you have already noticed, it is not easy to come up with a consistent interface for it. Afaik, other ORM's (like Propel, Doctrine, etc) don't have support for it either. As for your BTW, yes, t…
Comment by
WanWizard
February 2017
permalink
Regarding closure in FuelPHP 1.8
Closures should work in PHP 5.3+. They are used inside the framework as well, so I don't think that is the problem. What is the definition of "doesn't work"? Any error messages? Anything in the (php) logs? Any specific behaviour …
Comment by
WanWizard
February 2017
permalink
Two auth methods in the same app?
Yes, that is possible, but you have to extend one of the drivers, and make some changes, because the standard driver will have collisions. For example, both use the same variables to store the login state. There are also some changes in the way you …
Comment by
WanWizard
February 2017
permalink
Regarding closure in FuelPHP 1.8
What do you mean with "the closure"? A closure is a PHP language construct, it has nothing to do with Fuel. Perhaps you can post a code snippit so we can see what you are trying to do? As to validation, I assume you mean "define your …
Comment by
WanWizard
February 2017
permalink
oil scaffold / admin fatal error
This is what Monolog checks for (and what throws the error): https://github.com/Seldaek/monolog/blob/master/src/Monolog/Formatter/NormalizerFormatter.php#L34 The phpinfo() output should tell you whether or not the json.so module is loaded. If not, y…
Comment by
WanWizard
February 2017
permalink
Twig Autoloader not found
If you removed it from /public, it's probably in your browser cache.
Comment by
WanWizard
February 2017
permalink
oil scaffold / admin fatal error
I can't repoduce it here, so I assume it has something to do with your local system The 5.4 example is clear: you're missing the php json module, which Monolog seems to need, so you need to install it. For the 7.1.1 example: Fuel isn'…
Comment by
WanWizard
February 2017
permalink
How to use haml views with fuelPHP?
Will try to move it up the list, and report back here when done.
Comment by
WanWizard
February 2017
permalink
Is it possible to clone object's values only in FuelPHP ?
Will probably be released some as a 1.8 hotfix, so all you have to do then is run a composer update.
Comment by
WanWizard
February 2017
permalink
cURL digest
Cool, thanks for the feedback!
Comment by
WanWizard
February 2017
permalink
How to use haml views with fuelPHP?
There was no need to add all suggestions to your composer.json, all you need is "mthaml" if you want to use HAML on itself, and "twig" if you want to use HAML in combination with Twig. The default configuration is to use it with …
Comment by
WanWizard
February 2017
permalink
Is it possible to clone object's values only in FuelPHP ?
The original issue has been addressed in 1.9/develop, you can pass objects inplementing ArrayAccess to forge() now. No more need for the exact error message.
Comment by
WanWizard
February 2017
permalink
Is it possible to clone object's values only in FuelPHP ?
If you just do a find like in your original post, relations aren't loaded up front, they are loaded on demand. Can you tell me exactly what error you got, and on which file/line? An ORM model implements ArrayAccess, so if my suggestion gives an…
Comment by
WanWizard
February 2017
permalink
cURL digest
This might address the problem: https://github.com/fuel/core/commit/9a72b619264955171fa79c3bd8ce5822dae7464b
Comment by
WanWizard
February 2017
permalink
cURL digest
Can you check if it is using "PHP_AUTH_DIGEST" or "HTTP_AUTHORIZATION"? Might be a Windows thing we need to take into account...
Comment by
WanWizard
February 2017
permalink
Is it possible to clone object's values only in FuelPHP ?
If you clone a model object, it remains the same model object, so that will never work. You could try $employee = Model_Employee::find('first');$user = Model_User::forge($employee);$user->id = null;$user->save();
Comment by
WanWizard
February 2017
permalink
Change database not from config/db.php
edit: You don't need to explicitly load the db config if you first query the database for the correct DSN, in that case the config is already loaded. You can do this in your app bootstrap.php, after the call to \Fuel::init(), so the db config i…
Comment by
WanWizard
February 2017
permalink
Change database not from config/db.php
You can create a definition at runtime: // make sure the db config is loaded \Config::get('db', true); // dynamically create a new db config based on 'default' $mydb = \Config::get('db.default'); // set a new DSN $my…
Comment by
WanWizard
February 2017
permalink
Change database not from config/db.php
No, it stores a database definition string, as defined in your db.php. BTW, I now see (never used it myself!) that the model already has a "set_connection()" method, so you don't need to add that.
Comment by
WanWizard
February 2017
permalink
Change database not from config/db.php
An ORM model object has two connection properties: /** * @var string connection to use */ // protected static $_connection = null; /** * @var string write connection to use */ // protected static $_write_connection = null; They are ment to…
Comment by
WanWizard
February 2017
permalink
Change database not from config/db.php
Orm model? Crud model? Do you want to set it dynamically, at runtime, of you do want to be able to configure it per model?
Comment by
WanWizard
February 2017
permalink
Twig Autoloader not found
Lol, yup, Python is very different from PHP. Note that as of PHP 7, you can use the coalesce operator: $amount = $value['details']['discount']['price'] ?? $value['details']['amount']; which doesn…
Comment by
WanWizard
February 2017
permalink
Is there any way to set 404 template in the modules?
That depends on how you have handled your 404's. Normally you define a _404_ route to a controller method, that method can do whatever it wants, including loading a view. If your controller is not in the admin module, you need to specifically …
Comment by
WanWizard
February 2017
permalink
Source files?
This is difficult, because I have no idea of the local setup, and how the code is setup. Fuel is an application development framework, not a CMS like wordpress with a fixed structure. I suggest you start by downloading Fuel and install it locally as…
Comment by
WanWizard
February 2017
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,367
Last Active
8:11AM
Roles
Administrator