I have a model class which does not extend any core Zend module . This model was imported from my previous Zend framework 1 application . I am able to call its methods by converting it to namespace . The problem what I have is in reading global configuration in side the methods defined .
In case of controller I was able to access global configuration using below code
$config = $this->getServiceLocator()->get('config');
// This gives a union of global configuration along with module configuration .
But what should we do to access configuration in side a model class . Below is how my model class is
<?php
namespace test\Http;
class Request
{
protected $client;
public function abc( $c)
{
return $something;
}
......
}
I am new to Zend framework 2 please kindly suggest any method to achieve this .
In the above description model means ( MVC model class ) which has some business logic in it .