@@ -279,7 +279,7 @@ public function hasBeenStopped()
279
279
}
280
280
281
281
/**
282
- * Returns the number of the signal that caused the child process to stop its execution
282
+ * Returns the number of the signal that caused the child process to stop its execution.
283
283
*
284
284
* It is only meaningful if hasBeenStopped() returns true.
285
285
*
@@ -292,71 +292,141 @@ public function getStopSignal()
292
292
return $ this ->status ['stopsig ' ];
293
293
}
294
294
295
+ /**
296
+ * Adds a line to the STDOUT stream.
297
+ *
298
+ * @param string $line The line to append
299
+ */
295
300
public function addOutput ($ line )
296
301
{
297
302
$ this ->stdout .= $ line ;
298
303
}
299
304
305
+ /**
306
10000
td>+ * Adds a line to the STDERR stream.
307
+ *
308
+ * @param string $line The line to append
309
+ */
300
310
public function addErrorOutput ($ line )
301
311
{
302
312
$ this ->stderr .= $ line ;
303
313
}
304
314
315
+ /**
316
+ * Gets the command line to be executed.
317
+ *
318
+ * @return string The command to execute
319
+ */
305
320
public function getCommandLine ()
306
321
{
307
322
return $ this ->commandline ;
308
323
}
309
324
325
+ /**
326
+ * Sets the command line to be executed.
327
+ *
328
+ * @param string $commandline The command to execute
329
+ */
310
330
public function setCommandLine ($ commandline )
311
331
{
312
332
$ this ->commandline = $ commandline ;
313
333
}
314
334
335
+ /**
336
+ * Gets the process timeout.
337
+ *
338
+ * @return integer The timeout in seconds
339
+ */
315
340
public function getTimeout ()
316
341
{
317
342
return $ this ->timeout ;
318
343
}
319
344
345
+ /**
346
+ * Sets the process timeout.
347
+ *
348
+ * @param integer|null $timeout The timeout in seconds
349
+ */
320
350
public function setTimeout ($ timeout )
321
351
{
322
352
$ this ->timeout = $ timeout ;
323
353
}
324
354
355
+ /**
356
+ * Gets the working directory.
357
+ *
358
+ * @return string The current working directory
359
+ */
325
360
public function getWorkingDirectory ()
326
361
{
327
362
return $ this ->cwd ;
328
363
}
329
364
365
+ /**
366
+ * Sets the current working directory.
367
+ *
368
+ * @param string $cwd The new working directory
369
+ */
330
370
public function setWorkingDirectory ($ cwd )
331
371
{
332
372
$ this ->cwd = $ cwd ;
333
373
}
334
374
375
+ /**
376
+ * Gets the environment variables.
377
+ *
378
+ * @return array The current environment variables
379
+ */
335
380
public function getEnv ()
336
381
{
337
382
return $ this ->env ;
338
383
}
339
384
385
+ /**
386
+ * Sets the environment variables.
387
+ *
388
+ * @param array $env The new environment variables
389
+ */
340
390
public function setEnv (array $ env )
341
391
{
342
392
$ this ->env = $ env ;
343
393
}
344
394
395
+ /**
396
+ * Gets the contents of STDIN.
397
+ *
398
+ * @return string The current contents
399
+ */
345
400
public function getStdin ()
346
401
{
347
402
return $ this ->stdin ;
348
403
}
349
404
405
+ /**
406
+ * Sets the contents of STDIN.
407
+ *
408
+ * @param string $stdin The new contents
409
+ */
350
410
public function setStdin ($ stdin )
351
411
{
352
412
$ this ->stdin = $ stdin ;
353
413
}
354
414
415
+ /**
416
+ * Gets the options for proc_open.
417
+ *
418
+ * @return array The current options
419
+ */
355
420
public function getOptions ()
356
421
{
357
422
return $ this ->options ;
358
423
}
359
424
425
+ /**
426
+ * Sets the options for proc_open.
427
+ *
428
+ * @param array $options The new options
429
+ */
360
430
public function setOptions (array $ options )
361
431
{
362
432
$ this ->options = $ options ;
0 commit comments