|
SmallTutorial
tutorial
InitializationFor initialization Program package insert next code: include_once 'Program.php'; Create Program entityFor create entity of program you should be use method factory: // set full path to program binary
$mplayer =& Program::factory('mplayer', array('binary' => '/usr/bin/mplayer'));Params ManipulationYou can add any params to execute string: // add param string
$mplayer -> addParam('video_in.avi');
$mplayer -> addParamsString('video_in.avi');
// add param prefix and value
$mplayer -> addParam('-sstep', 4);
// add params array
$mplayer -> addParams(array('video_in.avi', '-sstep' => 4));Get params $mplayer->getParams(); Clear params $mplayer->clearParams(); Input/Output fileFor many application you can set input and output file:
Execute programFor run program use method exec or execInBackground (for unix systems only) |
Sign in to add a comment