Initializes object with IMAP command response

@param string $data IMAP response string
557640
public function init($data = null)
    {
        $this->meta = array();

        $data = explode('*', (string)$data);

        // ...skip unilateral untagged server responses
        for ($i=0, $len=count($data); $i<$len; $i++) {
            if (preg_match('/^ THREAD/i', $data[$i])) {
                // valid response, initialize raw_data for is_error()
                $this->raw_data = '';
                $data[$i] = substr($data[$i], 7);
                break;
            }

            unset($data[$i]);
        }

        if (empty($data)) {
            return;
        }

        $data = array_shift($data);
        $data = trim($data);
        $data = preg_replace('/[\r\n]/', '', $data);
        $data = preg_replace('/\s+/', ' ', $data);

        $this->raw_data = $this->parse_thread($data);
    }
427723
public function initialize(array $data = array())
    {
        if($this->exe->flash->has('form_data'))
            $this->set($this->exe->flash->get('form_data'));

        parent::initialize($data);
    }
688272
public function sendData($data)
    {
        $request = new AopNotifyRequest($this->httpClient, $this->httpRequest);
        $request->initialize($this->parameters->all());
        $request->setEndpoint($this->getEndpoint());
        $request->setParams($data);
        $request->setSort(false);
        $request->setEncodePolicy(Signer::ENCODE_POLICY_JSON);
        $request->setAlipayPublicKey($this->getAlipayPublicKey());

        /**
         * @var AopNotifyResponse $response
         */
        $response = $request->send();

        return $response;
    }
1054163
protected function callService($command, $data = array())
    {
        if (!$this->init) {
            throw new ClientNotInitializedException();
        }

        $data['auth.key'] = $this->clientApiConfig->getKey();
        $data['auth.secret'] = $this->clientApiConfig->getSecret();
        $data['command'] = $command;
        $data['project_id'] = $this->clientApiConfig->getProjectId();

        $msg = json_encode($data).PHP_EOL;

        $this->sendMessage($msg);

        $buffer = $this->readSocket();

        if ($this->debug) {
            print $buffer;
        }

        $result = json_decode($buffer, true);
        if (!count($result)) {
            throw new NullSocketResponseException();
        }

        return $result;
    }
240438
function initializeObjectAttribute( $contentObjectAttribute, $currentVersion, $originalContentObjectAttribute )
    {
        if ( $currentVersion != false )
        {
            $idString = $originalContentObjectAttribute->attribute( "data_text" );
            $contentObjectAttribute->setAttribute( "data_text", $idString );
            $contentObjectAttribute->store();
        }
    }
231609
public function onInput($data)
    {
        //Process data here
        foreach ($this->params as $copy => $original) {
            $data[$copy] = $data[$original];
        }
        $this->next($data);
    }
1150437
protected function init()
    {
        $structure = $this->imapFetchstructure();
        $this->structure = $structure;
        if (isset($structure->parts)) {
            $countSection = count($structure->parts);
            $this->countAttachment = $countSection - 1;
        }
        $this->getCountSection();
        $this->getHeader();
        $this->getAttachments();
        $this->getBody();
        if ($this->_decode === self::DECODE) {
            $this->decode();
        }
    }
188225
public function setEnvelope($data)
    {
        $this->_data[Horde_Imap_Client::FETCH_ENVELOPE] = is_array($data)
            ? new Horde_Imap_Client_Data_Envelope($data)
            : $data;
    }
26762
public static function setDataAttributes($data)
    {
        if(is_array($data) && count($data) > 0)
        {
            $keys = array_keys($data);

            $response = '';
            foreach($keys as $key)
            {
                $response .= ' data-' . $key . '="' . $data[$key] . '"';
            }

            return $response;
        }

        return null;
    }
77817
public function setData($data)
    {
        $this->originalData = $data;

        if ($data instanceof \Iterator) {
            $this->iterator = $data;
        }
        elseif (is_array($data)) {
            $this->iterator = new \ArrayIterator($data);
        }
        else {
            $this->iterator = new \ArrayIterator(array($data));
        }
    }
667773
protected function json($data) {
        $response = Router::getInstance()->response;
        $response->headers->set('Content-type', 'application/json');
        $response->setBody(to_json($data));
    }
1256095
protected function _parseEnabled(Horde_Imap_Client_Tokenize $data)
    {
        $c = $this->_capability();

        foreach ($data->flushIterator() as $val) {
            $c->enable($val);
        }
    }
970577
private function response($data)
    {
        // @codeCoverageIgnoreStart
        if (!Yii::$app instanceof \yii\console\Application) {
            \Yii::$app->response->format = \yii\web\Response::FORMAT_JSON;
        }
        // @codeCoverageIgnoreEnd
        return $data;
    }
684446
public function data($data)
    {
        if ($this->_rcpt == false) {
            throw new SMTPException(__('Must call RCPT before calling DATA'));
        }

        $this->_send('DATA');
        $this->_expect(354, 120);

        foreach ($this->_header_fields as $name => $body) {
            // Every header can contain an array. Will insert multiple header fields of that type with the contents of array.
            // Useful for multiple recipients, for instance.
            if (!is_array($body)) {
                $body = array($body);
            }

            foreach ($body as $val) {
                $this->_send($name . ': ' . $val);
            }
        }
        // Send an empty newline. Solves bugs with Apple Mail
        $this->_send('');

        // Because the message can contain \n as a newline, replace all \r\n with \n and explode on \n.
        // The send() function will use the proper line ending (\r\n).
        $data = str_replace("\r\n", "\n", $data);
        $data_arr = explode("\n", $data);

        foreach ($data_arr as $line) {
            // Escape line if first character is a period (dot). http://tools.ietf.org/html/rfc2821#section-4.5.2
            if (strpos($line, '.') === 0) {
                $line = '.' . $line;
            }
            $this->_send($line);
        }

        $this->_send('.');
        $this->_expect(250, 600);
        $this->_data = true;
    }
608083
public function initDataInterface(string $data):QRDataInterface{

		foreach(['Number', 'AlphaNum', 'Kanji', 'Byte'] as $mode){
			$dataInterface = __NAMESPACE__.'\\Data\\'.$mode;

			if(\call_user_func_array([$this, 'is'.$mode], [$data]) && \class_exists($dataInterface)){
				return new $dataInterface($this->options, $data);
			}

		}

		throw new QRCodeDataException('invalid data type'); // @codeCoverageIgnore
	}
670177
public void init(BaseMessageHeader messageHeader, Object data)
    {
        m_messageDataDesc = null;
        m_externalMessage = null;
        
        m_messageHeader = messageHeader;
        this.setData(data);
        m_bIsConsumed = false;
    }
496331
protected function onInput($data)
    {
        $ndata = array();
        foreach ($this->params as $colname) {
            if (isset($data[$colname])) {
                $ndata[$colname] = $data[$colname];
            }
        }

        $this->next($ndata);
    }