Get mail data
@param string $sEventName
@param array  $arResult
@return array
511043
protected function getMailData($sEventName, $arResult = [])
    {
        if (empty($sEventName)) {
            return $arResult;
        }

        //Get addition data for template
        //Fire event
        $arAdditionData = Event::fire($sEventName, $arResult);
        if (empty($arAdditionData) || !is_array($arAdditionData)) {
            return $arResult;
        }

        foreach ($arAdditionData as $arData) {
            if (empty($arData) || !is_array($arData)) {
                continue;
            }

            $arResult = array_merge($arResult, $arData);
        }

        return $arResult;
    }
586066
public function getContactData($addressData, ContactInterface $contact = null)
    {
        $result = [];

        if ($contact) {
            $this->mergeContactIntoAddressData($result, $contact);
        } elseif ($addressData && isset($addressData['firstName']) && isset($addressData['lastName'])) {
            $result['firstName'] = $addressData['firstName'];
            $result['lastName'] = $addressData['lastName'];
            $result['fullName'] = $result['firstName'] . ' ' . $result['lastName'];
            if (isset($addressData['title'])) {
                $result['title'] = $addressData['title'];
            }
            if (isset($addressData['salutation'])) {
                $result['salutation'] = $addressData['salutation'];
            }
            if (isset($addressData['formOfAddress'])) {
                $result['formOfAddress'] = $addressData['formOfAddress'];
            }
        } else {
            throw new MissingAttributeException('firstName, lastName or contact');
        }

        return $result;
    }
782000
public function getData($name = null, $default = null)
    {
        if (is_null($name)) {
            return $this->data;
        }

        return array_get($this->data, $name, $default);
    }
108683
private function get_index_data($mailbox, $sort_field, $sort_order, $mbox_data = array())
    {
        if (empty($mbox_data)) {
            $mbox_data = $this->imap->folder_data($mailbox);
        }

        if ($mbox_data['EXISTS']) {
            // fetch sorted sequence numbers
            $index = $this->imap->index_direct($mailbox, $sort_field, $sort_order);
        }
        else {
            $index = new rcube_result_index($mailbox, '* SORT');
        }

        return $index;
    }
942852
public function getEmails($tbl = 'managers')
	{
		if (!in_array($tbl, array('applicants', 'members', 'managers', 'invitees')))
		{
			return false;
		}

		$db = \App::get('db');

		if (empty($db))
		{
			return false;
		}

		$query = 'SELECT u.email FROM #__users AS u, #__xgroups_' . $tbl . ' AS gm WHERE gm.gidNumber=' . $db->quote($this->gidNumber) . ' AND u.id=gm.uidNumber;';

		$db->setQuery($query);

		$emails = $db->loadColumn();

		return $emails;
	}
662392
public function getArray($name, $default = [], $verb = 'get', $options = array())
    {

        if (strtolower($verb) == 'request') {
            $verb = $this->getVerb();
        }

        //just form casting
        $verb = strtolower($verb);

        if (!($input = $this->data($verb))) {
            return $default;
        }

        //Undefined
        if (empty($name) || !isset($input) || !isset($input[$name])) {
            if (isset($default) && !empty($default)) {
                return $default;
            } else {
                return null; //nothing for that name;
            }
        }

        //FILTER_SANITIZE_STRING
        //FILTER_SANITIZE_STRIPPED
        //\IS\HTML;
        $filter = \IS\CUSTOM;  //FILTER_CALLBACK;
        $options = array(
            "flags" => FILTER_REQUIRE_ARRAY,
        );

        //uhhhnrrr...
        $array = $input[$name];

        //Use the call back filter to clean this array
        //Sub processing for HTML and all that?
        return (array)$array;
    }
1040432
protected function getRowDataFromTable($tableName, $filtersArray)
    {
        $query   = $this->sQueryRowsFromTable([$tableName, $this->setArrayToFilterValues($filtersArray)]);
        $rawData = $this->setMySQLquery2Server($query, 'array_pairs_key_value')['result'];
        if (!is_null($rawData)) {
            $this->initializeSprGlbAndSession();
            foreach ($rawData as $key => $value) {
                $vToSet = str_replace(['\\\\"', '\\"', "\\\\'", "\\'"], ['"', '"', "'", "'"], $value);
                $this->tCmnRequest->request->set($key, $vToSet);
            }
        }
    }
593824
public function getContactData($addressData, $contact)
    {
        $result = array();
        // if account is set, take account's name
        if ($addressData && isset($addressData['firstName']) && isset($addressData['lastName'])) {
            $result['firstName'] = $addressData['firstName'];
            $result['lastName'] = $addressData['lastName'];
            $result['fullName'] = $result['firstName'] . ' ' . $result['lastName'];
            if (isset($addressData['title'])) {
                $result['title'] = $addressData['title'];
            }
            if (isset($addressData['salutation'])) {
                $result['salutation'] = $addressData['salutation'];
            }
        } else {
            if ($contact) {
                $result['firstName'] = $contact->getFirstName();
                $result['lastName'] = $contact->getLastName();
                $result['fullName'] = $contact->getFullName();
                $result['salutation'] = $contact->getFormOfAddress();
                if ($contact->getTitle() !== null) {
                    $result['title'] = $contact->getTitle()->getTitle();
                }
            } else {
                throw new MissingOrderAttributeException('firstName, lastName or contact');
            }
        }

        return $result;
    }
698395
protected function parseResults($result, array $extra_result_data = array())
    {
        $data = json_decode($result, true);
        $smsData = array();

        // There was an error
        if (empty($data['transferId']) || empty($data['statusCode'])) {
            return array_merge($this->getDefaults(), $extra_result_data, array(
                    'status' => ResultInterface::STATUS_FAILED,
                )
            );
        }

        // Get the transfer id
        $smsData['id'] = $data['transferId'];

        // Get the status
        switch ($data['statusCode']) {
            case 2000:
                $smsData['status'] = ResultInterface::STATUS_SENT;
                break;
            case 2001:
                $smsData['status'] = ResultInterface::STATUS_QUEUED;
                break;
            default:
                $smsData['status'] = ResultInterface::STATUS_FAILED;
                break;
        }

        return array_merge($this->getDefaults(), $extra_result_data, $smsData);
    }
1220879
public function getData()
    {
        $res = [
            'recipient' =>  [
                'id' => $this->recipient
            ],
            'notification_type'=> $this->notification_type,
            'messaging_type' => $this->messaging_type
        ];

        $attachment = new Attachment(Attachment::TYPE_AUDIO, [], $this->quick_replies);

        if (strcmp(intval($this->text), $this->text) === 0) {
            $attachment->setPayload(array('attachment_id' => $this->text));
        } elseif (strpos($this->text, 'http://') === 0 || strpos($this->text, 'https://') === 0) {
            $attachment->setPayload(array('url' => $this->text));
        } else {
            $attachment->setFileData($this->getCurlValue($this->text, mime_content_type($this->text), basename($this->text)));
        }

        $res['message'] = $attachment->getData();

        return $res;
    }
620925
protected function getMessages(Result $result)
    {
        $messages = array(
            'text' => '',
            'html' => '',
        );

        if ($result->hasMessages()) {
            $header = $this->t('mail_messages_header');
            $description = $this->t('mail_messages_desc');
            $descriptionHtml = $this->t('mail_messages_desc_html');
            $messagesText = $result->getMessages(Result::Format_FormattedText);
            $messagesHtml = $result->getMessages(Result::Format_Html);
            $messages = array(
                'text' => "\n$header\n\n$messagesText\n\n$description\n",
                'html' => "<details open><summary>$header</summary>$messagesHtml<p>$descriptionHtml</p></details>",
            );
        }
        return $messages;
    }
261367
public function getHeadersString(\Psr\Http\Message\ResponseInterface $psr7response)
    {
        $strHeaders = '';
        if($psr7response === null)
        {
            return $strHeaders;
        }

        $arrHeaders = $psr7response->getHeaders();
        if (!is_array($arrHeaders) || count($arrHeaders) < 1) {
            return '';
        }

        foreach ($arrHeaders as $key => $value) {

            $strVal = '';
            if(is_array($value) && count($value)>0){
                $strVal = $value[0];

            }elseif (is_string($value)){
                $strVal = $value;
            }

            $strHeaders .= $key.':'.$strVal.PHP_EOL;
        }

        return $strHeaders;
    }
1162773
public function extractResultIDs($resultInfo)
    {
        $candidates = [];
        foreach ($resultInfo as $insertResult) {
            $newID = $insertResult['id'];
            if (array_key_exists('request-id', $insertResult)) {
                $extid = $insertResult['request-id'];
            } else {
                $extid = null;
            }
            $evidence                      = explode('/', $insertResult['ref'])[3];
            $candidates[$evidence][$extid] = $newID;
        }
        return $candidates;
    }
571365
public function get(): \Assurrussa\GridView\Helpers\GridViewResult
    {
        $gridViewResult = $this->_getGridView();
        $gridViewResult->data = $this->pagination->get($this->page, $this->limit);
        $gridViewResult->pagination = $this->_getPaginationRender();
        $gridViewResult->simple = false;

        return $gridViewResult;
    }
929445
public function getResult($asString = true)
    {
        if ($asString) {
            $mergedResultArray= [];

            while ($suiteResultItem = array_pop($this->result)) {
                $mergedResultArray = array_merge($mergedResultArray, $suiteResultItem);
            }

            return json_encode($mergedResultArray);
        }

        return $this->result;
    }
168720
public static function findByEmail($strEmail, array $arrOptions = [])
	{
		$time = time();
		$t    = static::$strTable;

		$arrColumns = ["LOWER($t.email)=? AND ($t.start='' OR $t.start<$time) AND ($t.stop='' OR $t.stop>$time)"];

		return static::findOneBy($arrColumns, [$strEmail], $arrOptions);
	}
947932
public function pregValues($pattern, $defaultResult = null, $flags = 0)
    {
        $result = preg_grep($pattern, array_values($this->target), $flags);

        return $result ? array_values($result) : $defaultResult;
    }