Mercurial > hg > isophonics-drupal-site
annotate vendor/symfony/process/Pipes/PipesInterface.php @ 19:fa3358dc1485 tip
Add ndrum files
author | Chris Cannam |
---|---|
date | Wed, 28 Aug 2019 13:14:47 +0100 |
parents | 4c8ae668cc8c |
children |
rev | line source |
---|---|
Chris@0 | 1 <?php |
Chris@0 | 2 |
Chris@0 | 3 /* |
Chris@0 | 4 * This file is part of the Symfony package. |
Chris@0 | 5 * |
Chris@0 | 6 * (c) Fabien Potencier <fabien@symfony.com> |
Chris@0 | 7 * |
Chris@0 | 8 * For the full copyright and license information, please view the LICENSE |
Chris@0 | 9 * file that was distributed with this source code. |
Chris@0 | 10 */ |
Chris@0 | 11 |
Chris@0 | 12 namespace Symfony\Component\Process\Pipes; |
Chris@0 | 13 |
Chris@0 | 14 /** |
Chris@0 | 15 * PipesInterface manages descriptors and pipes for the use of proc_open. |
Chris@0 | 16 * |
Chris@0 | 17 * @author Romain Neutron <imprec@gmail.com> |
Chris@0 | 18 * |
Chris@0 | 19 * @internal |
Chris@0 | 20 */ |
Chris@0 | 21 interface PipesInterface |
Chris@0 | 22 { |
Chris@0 | 23 const CHUNK_SIZE = 16384; |
Chris@0 | 24 |
Chris@0 | 25 /** |
Chris@0 | 26 * Returns an array of descriptors for the use of proc_open. |
Chris@0 | 27 * |
Chris@0 | 28 * @return array |
Chris@0 | 29 */ |
Chris@0 | 30 public function getDescriptors(); |
Chris@0 | 31 |
Chris@0 | 32 /** |
Chris@0 | 33 * Returns an array of filenames indexed by their related stream in case these pipes use temporary files. |
Chris@0 | 34 * |
Chris@0 | 35 * @return string[] |
Chris@0 | 36 */ |
Chris@0 | 37 public function getFiles(); |
Chris@0 | 38 |
Chris@0 | 39 /** |
Chris@0 | 40 * Reads data in file handles and pipes. |
Chris@0 | 41 * |
Chris@0 | 42 * @param bool $blocking Whether to use blocking calls or not |
Chris@0 | 43 * @param bool $close Whether to close pipes if they've reached EOF |
Chris@0 | 44 * |
Chris@0 | 45 * @return string[] An array of read data indexed by their fd |
Chris@0 | 46 */ |
Chris@0 | 47 public function readAndWrite($blocking, $close = false); |
Chris@0 | 48 |
Chris@0 | 49 /** |
Chris@0 | 50 * Returns if the current state has open file handles or pipes. |
Chris@0 | 51 * |
Chris@0 | 52 * @return bool |
Chris@0 | 53 */ |
Chris@0 | 54 public function areOpen(); |
Chris@0 | 55 |
Chris@0 | 56 /** |
Chris@0 | 57 * Returns if pipes are able to read output. |
Chris@0 | 58 * |
Chris@0 | 59 * @return bool |
Chris@0 | 60 */ |
Chris@0 | 61 public function haveReadSupport(); |
Chris@0 | 62 |
Chris@0 | 63 /** |
Chris@0 | 64 * Closes file handles and pipes. |
Chris@0 | 65 */ |
Chris@0 | 66 public function close(); |
Chris@0 | 67 } |