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
Error when running unit test on fresh fuel install
Should be fixed in https://github.com/fuel/core/commit/2548720d882a321124f483357f6067b63c732419
Comment by
WanWizard
March 2014
permalink
Simpleauth - Model_User
Simpleauth is what the name implies, a simple authentication driver. It uses a table for user data, and a config file for everything else. It does not use Orm (or Model_Crud), and there is no Orm model provided for it. If you want to use Orm, switc…
Comment by
WanWizard
March 2014
permalink
Share logic between views
Yes, you can pass a View to Viewmodel::forge(), it don't want to auto-detect-and-load mechanism to kick in.
Comment by
WanWizard
March 2014
permalink
FuelPHP + DbUnit: Database Connection
Calling connection() on the Database_Connection instance would give you the underlying driver (PDO, MySQLi, etc) instance. Or do you mean something else?
Comment by
WanWizard
February 2014
permalink
Keep getting 'Trying to get property of non-object'
I'm still utterly clueless to what you are doing... ;-) You pass $clients AND as a selected option value (or multiple values), AND as option data array? The second argument of Form::select() is the selected value, which is an int, a string, o…
Comment by
WanWizard
February 2014
permalink
Keep getting 'Trying to get property of non-object'
I can't tell you what to do, because I don't know your intentions / design goal. All I can see is that you do a find('all'), which returns an array of model objects (or an empty array if no records found), somewhere in your code…
Comment by
WanWizard
February 2014
permalink
Keep getting 'Trying to get property of non-object'
find('all') always returns an array of objects (even if there is only one result), similar to get() in chained mode. find('first') returns a single object, similar to get_one() in chained mode.
Comment by
WanWizard
February 2014
permalink
Keep getting 'Trying to get property of non-object'
"id" is the name of the relation? Or of the PK column?
Comment by
WanWizard
February 2014
permalink
Encode/Decode with RSA
If you want to use PHPSecLib's RSA implementation, you're best of to create your own crypter class, to encapsulate the native class. You can use our Crypt class as an example. You can follow the examples found online (like http://phpsecli…
Comment by
WanWizard
February 2014
permalink
who to get HMVC result in Array
The Request object has a method called response() to fetch the response after execution. The Response object has a method called body(), which you can use to retrieve the response body. So: try { $body = Request::forge()->execute()->resp…
Comment by
WanWizard
February 2014
permalink
Observers and class inheritance
Ah.... Then it probably is. Unfortunately, we don't have the time to support almost 3 year old code. You'll have to dive into the ORM's model.php, and debug the observers() method (which loads and parses the observer definition) and…
Comment by
WanWizard
February 2014
permalink
Encode/Decode with RSA
You want to encrypt what exactly? If you tell use what you want to do, we can tell you how to do it. The Crypt class uses AES, which is a pretty solid encryption method.
Comment by
WanWizard
February 2014
permalink
Keep getting 'Trying to get property of non-object'
It can be either $contact->client_id or $clients->id. So you need to check both, one of them is not an object.
Comment by
WanWizard
February 2014
permalink
No MySQLi Connection Error on Ubuntu 12.04 LTS (elementary OS)
Again without error message? What you can do is go into ./fuel/core/bootstrap.php, and comment out the set_exception_handler() and set_error_handler() definitions. This will cause Fuel not to capture any error message, so you can see the plain PH…
Comment by
WanWizard
February 2014
permalink
Orm Relations
As always, "It depends". ;-) Its more of a design question, and as to ORM's there are two schools of thought. One that says the ORM provides the model (and the model logic), and since the model is used in the controller, that is wh…
Comment by
WanWizard
February 2014
permalink
No MySQLi Connection Error on Ubuntu 12.04 LTS (elementary OS)
Very weird. No error message at all? Never seen that, and no explaination for it...
Comment by
WanWizard
February 2014
permalink
No MySQLi Connection Error on Ubuntu 12.04 LTS (elementary OS)
MariaDB here too, so that is not an issue. You are sure your app runs in 'dev' mode (i.e. are you looking at the correct config file)? Not secretly a SetEnv somewhere? Can you add a die() to that db.php, to check if it's being loaded…
Comment by
WanWizard
February 2014
permalink
No MySQLi Connection Error on Ubuntu 12.04 LTS (elementary OS)
You get the error in the application, or in an oil script on the commandline?
Comment by
WanWizard
February 2014
permalink
Observers and class inheritance
If it were a bug, it wouldn't work for me too. But it does. If you have this _init() in a base class, you need to define the property in the base class too, otherwise it won't work: protected static $_observers = array(); This is more o…
Comment by
WanWizard
February 2014
permalink
Validating an Auth Driver
Afaik drivers don't store configuration data, they use Config::get() internally too. So there is nothing to fetch.
Comment by
WanWizard
February 2014
permalink
Validating an Auth Driver
All config is in the config file, which you can read like any other config file, using \Config::get() ?
Comment by
WanWizard
February 2014
permalink
Observers and class inheritance
I have models that do: static::$_observers['Orm\\Observer_CreatedAt'] = array('events' => array('before_insert'),'property' => 'created_at', 'mysql_timestamp' => false); static::$…
Comment by
WanWizard
February 2014
permalink
Getting class methods without calling action_index
I don't understand what you want. What is "override the "action_index" from creating" ? If you want to have information about classes you can use Reflection.
Comment by
WanWizard
February 2014
permalink
Observers and class inheritance
I can't see without knowing what you exactly do. But assuming all you do is add it to the array in _init, I don't see what the difference would be.
Comment by
WanWizard
February 2014
permalink
create 3 table many to many relationship
It is a not-supported setup. A through table can only contain the two foreign keys, nothing else. If you need more columns in the through table (either a third foreign key or data columns), you need to make a model for it, and change the many-many …
Comment by
WanWizard
February 2014
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,371
Last Active
May 14
Roles
Administrator