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
Acessing Viewmodel from Controller
ViewModel, not Viewmodel.
Comment by
WanWizard
May 2014
permalink
Acessing Viewmodel from Controller
Is your controller in a namespace? If so you need to prefix it with a \ to force a load from the global namespace. So \Viewmodel::forge()...
Comment by
WanWizard
May 2014
permalink
ViewModels
That would be more like a filter. Take for example an invoice. It has invoice header info (client name, invoice number, etc), and you have invoice lines (quantity, product, price per item, VAT code). So your controller would do: $invoice = Model_…
Comment by
WanWizard
May 2014
permalink
ViewModels
Another example is using multiple layout, for example browser and mobile. Your controller should not be bothered with this, it gets the requests, fetches the data, sends it to the Viewmodel, job done. The Viewmodel can (for example based on data o…
Comment by
WanWizard
May 2014
permalink
ViewModels
I think the docs explain it quite well: http://fuelphp.com/docs/general/viewmodels.html If it makes it easier, try to imagine using a View parser like Smarty or Twig, where you don't have PHP in your views. This means you can not put any proce…
Comment by
WanWizard
May 2014
permalink
Routing
There are several things wrong with it. Your use the namespace "Fuel\Core", which is reserved for the framework components itself. Your App by default lives in the global namespace, so no namespace definition is needed. Second, if your c…
Comment by
WanWizard
May 2014
permalink
Mixed content
1. Yes, environment config is supported for all config files. As to the other question, I would have to look into that.
Comment by
WanWizard
May 2014
permalink
ViewModels
Viewmodels are classes that encapsulate a view, and which sometimes is called a Presenter. The idea is that you keep your views free of any logic, other then the logic needed to create the page (foreach and if structures), but also keep logic speci…
Comment by
WanWizard
May 2014
permalink
TLS support for smtp
Problem here is no response from the mailserver. The RFC states that the mailserver MUST respond to each command with a status code and an optional response text. Code 221 is expected here, but none is returned. This could also be an incorrect li…
Comment by
WanWizard
May 2014
permalink
How to use ajax to retrieve info from my DB?
Use a controller that extends Controller_Rest. Determine the format you want to use to exchange data (xml, json, ...?), and Either use a client-side determined format (through the HTTP ACCEPT header) or a fixed format set in the controller. Once …
Comment by
WanWizard
May 2014
permalink
ORM - Temporal Model - Fetch Related Objects
I have to pass this on to Steve then. He doesn't do forums, so either create an issue for it at https://github.com/fuel/orm/issues (if none exists for this issue), or pop into our IRC channel, he's online during most of the day (GMT).
Comment by
WanWizard
May 2014
permalink
Classes subfolder - how to move
Sorry? What folders? Again, start by explaining what you want (at the functional level). A FuelPHP application that is of reasonable size and is designed in a modular and loosely coupled fashion has dozens of 'classes' folders. We have…
Comment by
WanWizard
May 2014
permalink
HHVM
We have no intention at the moment. Fuel v1 is getting close to end-of-development, Fuel v2 isn't ready yet. In terms of priority I think we need to get v2 ready first.
Comment by
WanWizard
May 2014
permalink
Classes subfolder - how to move
Start by explaining why you have a need to change this? Perhaps there are better ways to solve your problem. FuelPHP is already very flexible as to where files are stored (through modules and packages), but in those locations the folder structure i…
Comment by
WanWizard
May 2014
permalink
Theme usage
Seems I had a similar problem, causing me to look with my nose... :-( I thought you added the 'name' index, but you removed it, which is correct, I'll merge the PR.
Comment by
WanWizard
May 2014
permalink
Redis
Not sure there is any point. The Redis_Db class doesn't do anything magical, it just provides the same sort of methods the PECL extension gives. It's primarily there for environments where you need a redis library, but you are not in a p…
Comment by
WanWizard
May 2014
permalink
Theme usage
Does this info file already exist, or not? save() is not meant to create new info files, it's just meant to update existing files. find_file() can not return a path to a file that isn't there. This commit fixed the issue you have in save…
Comment by
WanWizard
May 2014
permalink
Theme usage
If you installed Fuel from zip, switch to a git clone. If you have git local, you can use "oil create " to create a new Fuel installation. If you have a git driven installation, go into the root, fuel/core and all fuel/packages, and go &q…
Comment by
WanWizard
May 2014
permalink
Redis
FuelPHP includes the Redis_Db class, which is a pure-PHP implementation of a Redis client. It does not require any external dependency, it communicates with the Redis server using sockets. Obviously, since it's a PHP implementation, it's …
Comment by
WanWizard
May 2014
permalink
Theme usage
When you bump into issues like this, always check the latest develop branch to see it is already fixed. Would have saved you the grief, because this issue was fixed some time ago. Your setup looks fine, I have compared it to my apps here, and it…
Comment by
WanWizard
May 2014
permalink
ORM - Temporal Model - Fetch Related Objects
Had been delayed a few days, an issue with Sessions has popped up which needs to be fixed first. It's is not a problem to switch to 1.8/develop,
Comment by
WanWizard
May 2014
permalink
How do I load a vendor class in a task
Yes, you can. The reason all core classes are aliased is that it makes it easy to extend them. If you use the core class directly, you bypass any extension and that can have consequences.
Comment by
WanWizard
May 2014
permalink
How do I load a vendor class in a task
Apart from an aid for lazy people, you can also "mis-use" the use statement to alias classes. For example you can change use Orm\Model; by use My\Own\ModelClass as Model; and you don't have to change your code. But I agree that f…
Comment by
WanWizard
May 2014
permalink
Why "minimum-stability": "dev" ?
Yes. Or remove it all together, because it defaults to stable.
Comment by
WanWizard
May 2014
permalink
Events - Tasks, modules and autoloading
Currently that mechanism does not exist. It should not be to difficult to create. Extend the \Fuel\Core\Module class in your app, and modify the load() method to support a bootstrap.php. You can check Package::load() to see how that is done. Once …
Comment by
WanWizard
May 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,368
Last Active
9:34AM
Roles
Administrator