I’m curios if Zend has a component which can make use of the shell. For example I want to do an shell command like this:
mysqldump --compact --uroot --ppass mydatabase mydable >test.sql
from a controller.
If there isn’t, do you know a way how to dump data from tables in Zend Framework?
update:
I’ve found a way here http://www.zfsnippets.com/snippets/view/id/68
There’s no direct exec() support in the zend framework. the closest to command line support there is the
Zend_Consoleclass, but it’s meant for getting arguments from the command line.I would wrap the exec() function as a process object and work with that. Here’s a nice example from the php docs:
It’s also let you stop and check the status of a job.