You would need to pass in the config data when you instantiate your model class. There isn't a getApplication() method in our models nor is it recommended your model has access to your DI container. You could do this by passing a Registry object in with your config data attached to it.
On Tuesday, March 18, 2014, <sach... AT tekdi.net> wrote:Hello Everyone,--I'm new in Joomla framework. In Joomla Framework I want to access config file in the model file.I have tried it by following ways, but I'm not able to access it.1. $this->getApplication()->
config->get();2. $this->getContainer()-> config->get();And one more question is, how to access getApplication() function in Model file?
Framework source code: https://github.com/joomla/
Visit http://developer.joomla.org for more information about developing with Joomla!
You received this message because you are subscribed to the Google Groups "Joomla! Framework Development" group.
To unsubscribe from this group and stop receiving emails from it, send an email to joomla-dev-framework+
unsubscribe AT googlegroups.com.
Visit this group at http://groups.google.com/
Please pardon any errors, this message was sent from my iPhone.