Returns data received from the connection stream.

@throws ezcMailTransportSmtpException
if there is no valid connection
@return string
431919
protected function getData()
    {
        $data = '';
        $line   = '';
        $loops  = 0;

        if ( is_resource( $this->connection ) )
        {
            while ( ( strpos( $data, self::CRLF ) === false || (string) substr( $line, 3, 1 ) !== ' ' ) && $loops < 100 )
            {
                $line = fgets( $this->connection, 512 );
                $data .= $line;
                $loops++;
            }
            return $data;
        }
        throw new ezcMailTransportSmtpException( 'Could not read from SMTP stream. It was probably terminated by the host.' );
    }
345097
private function isDataOnStream()
    {
        $read = [$this->connection];
        $write = null;
        $except = null;
        $hasStreamInfo = @stream_select($read, $write, $except, 0);

        if ($hasStreamInfo === false) {
            // can return `false` if used in combination with `pcntl_signal` and lead to false errors here
            $error = error_get_last();
            if ($error && isset($error['message']) && stripos($error['message'], 'interrupted system call') === false) {
                throw new ConnectionException(
                    'Check failed to determine if the socket is readable.',
                    $this->activeHost
                );
            }
            return null;
        }

        return !empty($read);
    }
825662
public function receive()
    {
        // Read data from the socket
        socket_recv($this->socket, $msg, $this->buffer, MSG_DONTWAIT);

        if ($msg === false) {
            return null;
        }

        // Trim the padding from the message content
        $msg = trim($msg);

        // If message is not valid JSON, return it verbatim
        if (json_decode($msg) === null) {
            return $msg;
        }

        // Decode and return the message content
        return json_decode($msg);
    }
1023893
ByteArrayInputStream getExportStream() {

        Map<CmsUUID, CmsUser> exportUsers = getUserToExport();

        StringBuffer buffer = new StringBuffer();
        CmsUserExportSettings settings = OpenCms.getImportExportManager().getUserExportSettings();

        String separator = CmsStringUtil.substitute(settings.getSeparator(), "\\t", "\t");
        List<String> values = settings.getColumns();

        buffer.append("name");
        Iterator<String> itValues = values.iterator();
        while (itValues.hasNext()) {
            String colName = itValues.next();
            if (isColumnExportable(colName)) {
                buffer.append(separator);
                buffer.append(colName);
            }
        }
        buffer.append("\n");

        Object[] users = exportUsers.values().toArray();

        for (int i = 0; i < users.length; i++) {
            CmsUser exportUser = (CmsUser)users[i];
            if (!isExportable(exportUser)) {
                continue;
            }
            buffer.append(exportUser.getSimpleName());
            itValues = values.iterator();
            while (itValues.hasNext()) {
                buffer.append(separator);
                String curValue = itValues.next();
                if (isColumnExportable(curValue)) {
                    try {
                        Method method = CmsUser.class.getMethod(
                            "get" + curValue.substring(0, 1).toUpperCase() + curValue.substring(1));
                        String curOutput = (String)method.invoke(exportUser);
                        if (CmsStringUtil.isEmptyOrWhitespaceOnly(curOutput) || curOutput.equals("null")) {
                            curOutput = (String)exportUser.getAdditionalInfo(curValue);
                        }

                        if (curValue.equals("password")) {
                            curOutput = OpenCms.getPasswordHandler().getDigestType() + "_" + curOutput;
                        }

                        if (!CmsStringUtil.isEmptyOrWhitespaceOnly(curOutput) && !curOutput.equals("null")) {
                            buffer.append(curOutput);
                        }
                    } catch (NoSuchMethodException e) {
                        Object obj = exportUser.getAdditionalInfo(curValue);
                        if (obj != null) {
                            String curOutput = String.valueOf(obj);
                            if (CmsStringUtil.isNotEmptyOrWhitespaceOnly(curOutput)) {
                                buffer.append(curOutput);
                            }
                        }
                    } catch (IllegalAccessException e) {
                        //
                    } catch (InvocationTargetException e) {
                        //
                    }
                }
            }
            buffer.append("\n");

        }
        return new ByteArrayInputStream(buffer.toString().getBytes());
    }
239506
public function getData()
    {
        $data = array();

        /** @var eZContentClassAttribute $contentClassAttribute */
        $contentClassAttribute = $this->ContentObjectAttribute->contentClassAttribute();

        $keywordFieldName = parent::generateAttributeFieldName( $contentClassAttribute, 'lckeyword' );
        $textFieldName = parent::generateAttributeFieldName( $contentClassAttribute, 'text' );
        $tagIDsFieldName = parent::generateSubattributeFieldName( $contentClassAttribute, 'tag_ids', 'sint' );

        $data[$keywordFieldName] = '';
        $data[$textFieldName] = '';
        $data[$tagIDsFieldName] = array();

        if ( !$this->ContentObjectAttribute->hasContent() )
            return $data;

        $objectAttributeContent = $this->ContentObjectAttribute->content();
        if ( !$objectAttributeContent instanceof eZTags )
            return $data;

        $tagIDs = array();
        $keywords = array();

        $this->indexSynonyms = eZINI::instance( 'eztags.ini' )->variable( 'SearchSettings', 'IndexSynonyms' ) === 'enabled';
        $indexParentTags = eZINI::instance( 'eztags.ini' )->variable( 'SearchSettings', 'IndexParentTags' ) === 'enabled';
        $includeSynonyms = eZINI::instance( 'eztags.ini' )->variable( 'SearchSettings', 'IncludeSynonyms' ) === 'enabled';

        $tags = $objectAttributeContent->attribute( 'tags' );
        if ( is_array( $tags ) )
        {
            foreach ( $tags as $tag )
            {
                if ( $tag instanceof eZTagsObject )
                {
                    $this->processTag( $tag, $tagIDs, $keywords, $indexParentTags, $includeSynonyms );
                }
            }
        }

        if ( !empty( $tagIDs ) )
        {
            $data[$keywordFieldName] = implode( ', ', $keywords );
            $data[$textFieldName] = implode( ' ', $keywords );
            $data[$tagIDsFieldName] = $tagIDs;
        }

        $data['ezf_df_tag_ids'] = $tagIDs;
        $data['ezf_df_tags'] = $keywords;

        return $data;
    }
649953
public MessageTransport getMessageTransport(String strMessageTransport)
    {
        if ((strMessageTransport == null) || (strMessageTransport.length() == 0))
            return null;
        if (Utility.isNumeric(strMessageTransport))
        {
            this.setKeyArea(MessageTransport.ID_KEY);
            this.getField(MessageTransport.ID).setString(strMessageTransport);  
        }
        else
        {
            this.setKeyArea(MessageTransport.CODE_KEY);
            this.getField(MessageTransport.CODE).setString(strMessageTransport);
        }
        try {
            if (this.seek(null))
                return this;
        } catch (DBException ex) {
            ex.printStackTrace();
        }
        return null;
    }
896032
public function getReasonCode()
    {
        $code = null;

        if (isset($this->data['messages'])) {
            // In case of a successful transaction, a "messages" element is present
            $code = (string)$this->data['messages']['message']['code'];
        }

        return $code;
    }
1228432
public String getContent() throws ConnectionException {
    	
    	logger.debug("Enter Response::getContent");	
    	
    	if (content != null) {
    		logger.debug("content already available ");
            return content;
        }

    	BufferedReader rd = new BufferedReader(new InputStreamReader(stream));
		StringBuffer result = new StringBuffer();
		String line = "";
		try {
			while ((line = rd.readLine()) != null) {
			    result.append(line);
			}
		} catch (IOException e) {
			logger.error("Exception while retrieving content", e);
            throw new ConnectionException(e.getMessage());
		}
		content = result.toString();
		logger.debug("End Response::getContent");	
		return content;
        
    }
958467
protected function getMessages()
    {
        $msgs = array();
        // Read something.
        $read = @fread($this->socket, 65535);
        if ($read === false || @feof($this->socket)) {
            throw new ClientException('Error reading');
        }
        $this->currentProcessingMessage .= $read;
        // If we have a complete message, then return it. Save the rest for
        // later.
        while (($marker = strpos($this->currentProcessingMessage, Message::EOM))) {
            $msg = substr($this->currentProcessingMessage, 0, $marker);
            $this->currentProcessingMessage = substr(
                $this->currentProcessingMessage,
                $marker + strlen(Message::EOM)
            );
            $msgs[] = $msg;
        }
        return $msgs;
    }
96046
public function getTransport() {
        if ($this->transport === null || !$this->transport instanceof xPDOTransport) {
            $transportClass= $this->xpdo->getOption('xPDOTransport.class', null, 'xPDOTransport');
            $this->transport= new $transportClass($this);
            if ($this->transport === null || !$this->transport instanceof xPDOTransport) {
                $this->xpdo->log(xPDO::LOG_LEVEL_ERROR, "Could not load xPDOTransport [{$transportClass}] class.");
            }
        }
        return $this->transport;
    }
164620
public function getFileInfo()
    {
        $upload = new eZContentUpload();
        $errors = array();
        $mimeData = $file = '';
        $result = $upload->fetchHTTPFile( 'UploadFile', $errors, $file, $mimeData );

        if ( $result === false )
        {
            throw new RuntimeException(
                ezpI18n::tr(
                    'extension/ezjscore/ajaxuploader',
                    'Unable to retrieve the uploaded file: %message',
                    null, array( '%message' => $errors[0]['description'] )
                )
            );
        }
        return array(
            'file' => $file,
            'mime' => $mimeData
        );
    }
955961
protected function _getData()
	{
		do
		{
			$data = fgetcsv( $this->_fh, 0, $this->_separator, $this->_enclosure, $this->_escape );

			if( $data === false || $data === null ) {
				return null;
			}
		}
		while( $data === array( null ) );

		return $data;
	}
77273
protected function getNextTransport(): ?TransportInterface
    {
        $cursor = $this->cursor;
        while (true) {
            $transport = $this->transports[$cursor];

            if (!$this->isTransportDead($transport)) {
                break;
            }

            if ((microtime(true) - $this->deadTransports[$transport]) > $this->retryPeriod) {
                $this->deadTransports->detach($transport);

                break;
            }

            if ($this->cursor === $cursor = $this->moveCursor($cursor)) {
                return null;
            }
        }

        $this->cursor = $this->moveCursor($cursor);

        return $transport;
    }
600131
private function getData()
    {
        $data = fgets($this->socket);
        if ($data === false || $data === '') {
            throw new ConnectionException('Nothing received while reading from client');
        }
        return $data;
    }
843204
private function getSmtpTransport(): \Swift_SmtpTransport
    {
        $object = new \Swift_SmtpTransport(
            $this->config('smtp.host'),
            $this->config('smtp.port'),
            $this->config('smtp.encryption')
        );

        return $object
            ->setUsername($this->config('smtp.username'))
            ->setPassword($this->config('smtp.password'))
        ;
    }
489422
public static function getConnection() {
        global $PDOX, $CFG;

        if ( isset($PDOX) && is_object($PDOX) && get_class($PDOX) == 'Tsugi\Util\PDOX' ) {
            return $PDOX;
        }

        if ( defined('PDO_WILL_CATCH') ) {
            $PDOX = new \Tsugi\Util\PDOX($CFG->pdo, $CFG->dbuser, $CFG->dbpass);
            $PDOX->setAttribute(\PDO::ATTR_ERRMODE, \PDO::ERRMODE_EXCEPTION);
        } else {
            try {
                $PDOX = new \Tsugi\Util\PDOX($CFG->pdo, $CFG->dbuser, $CFG->dbpass);
                $PDOX->setAttribute(\PDO::ATTR_ERRMODE, \PDO::ERRMODE_EXCEPTION);
            } catch(\PDOException $ex){
                error_log("DB connection: ".$ex->getMessage());
                die('Failure connecting to the database, see error log'); // with error_log
            }
        }
        if ( isset($CFG->slow_query) ) $PDOX->slow_query = $CFG->slow_query;
        return $PDOX;
    }
101515
private function getConnectionString() {
        $parameters = array(
            'host='             . $this->getHost(),
            'connect_timeout='  . $this->getConnectTimeout(),
            'user='             . $this->getUserName(),
        );
        $this->hasPort()        && $parameters[] = 'port='      . $this->getPort();
        $this->hasPassword()    && $parameters[] = 'password='  . $this->getPassword();
        $this->hasDatabase()    && $parameters[] = 'dbname='    . $this->getDatabase();

        return implode(' ', $parameters);
    }