Chris@0: Chris@0: * Chris@0: * For the full copyright and license information, please view the LICENSE Chris@0: * file that was distributed with this source code. Chris@0: */ Chris@0: Chris@0: namespace Symfony\Component\Process\Pipes; Chris@0: Chris@0: /** Chris@0: * PipesInterface manages descriptors and pipes for the use of proc_open. Chris@0: * Chris@0: * @author Romain Neutron Chris@0: * Chris@0: * @internal Chris@0: */ Chris@0: interface PipesInterface Chris@0: { Chris@0: const CHUNK_SIZE = 16384; Chris@0: Chris@0: /** Chris@0: * Returns an array of descriptors for the use of proc_open. Chris@0: * Chris@0: * @return array Chris@0: */ Chris@0: public function getDescriptors(); Chris@0: Chris@0: /** Chris@0: * Returns an array of filenames indexed by their related stream in case these pipes use temporary files. Chris@0: * Chris@0: * @return string[] Chris@0: */ Chris@0: public function getFiles(); Chris@0: Chris@0: /** Chris@0: * Reads data in file handles and pipes. Chris@0: * Chris@0: * @param bool $blocking Whether to use blocking calls or not Chris@0: * @param bool $close Whether to close pipes if they've reached EOF Chris@0: * Chris@0: * @return string[] An array of read data indexed by their fd Chris@0: */ Chris@0: public function readAndWrite($blocking, $close = false); Chris@0: Chris@0: /** Chris@0: * Returns if the current state has open file handles or pipes. Chris@0: * Chris@0: * @return bool Chris@0: */ Chris@0: public function areOpen(); Chris@0: Chris@0: /** Chris@0: * Returns if pipes are able to read output. Chris@0: * Chris@0: * @return bool Chris@0: */ Chris@0: public function haveReadSupport(); Chris@0: Chris@0: /** Chris@0: * Closes file handles and pipes. Chris@0: */ Chris@0: public function close(); Chris@0: }