This is a Zend Framework - Application.ini question.
On my local dev client my path to princexml inside my controller is:
$prince = new Prince("/usr/local/bin/prince");
On my stage server inside my controller it is:
$prince = new Prince("/usr/bin/prince");
I have both Production, Stage & Development areas in my Application.ini
What is the best way to set the path for princexml in the Application.ini and then call it from my controller correctly?
Probably the best place to specify Prince path and any other related properties is in the application.ini
file
[production]
prince.path = "/usr/local/bin/prince"
[staging : production]
prince.path = "/usr/bin/prince"
To access price config inside a controller:
public function indexAction()
{
$princeSettings = $this->getInvokeArg('bootstrap')
->getOption('prince');
$prince = new Price($princeSettings['path']);
}