private function getStream($type)
    {
        if (!isset($this->streams[$type])) {
            $this->streams[$type] = fopen($this->streamUrls[$type], $type == 'input' ? 'r' : 'w');
        }
        return $this->streams[$type];
    }
private function getStream($type)
    {
        if (!isset($this->streams[$type])) {
            $this->streams[$type] = fopen($this->streamUrls[$type], $type == 'input' ? 'r' : 'w');
        }
        return $this->streams[$type];
    }
private function getStream ( $ type ) { if ( ! isset ( $ this -> streams [ $ type ] ) ) { $ this -> streams [ $ type ] = fopen ( $ this -> streamUrls [ $ type ] , $ type == 'input' ? 'r' : 'w' ) ; } return $ this -> streams [ $ type ] ; }
Returns a stream resource for a given stream type.
If the stream has not been opened this method opens the stream before
returning the asociated resource. This ensures that there is only one
resource handle to any stream at any given time.

@param string $type
@return resource
Returns a stream resource for a given stream type . If the stream has not been opened this method opens the stream before returning the asociated resource . This ensures that there is only one resource handle to any stream at any given time .