Создает GUID для объекта.
@return string
325294
public function generateGUID()
    {
        return sprintf(
            '%04x%04x-%04x-%04x-%04x-%04x%04x%04x',
            // 32 bits for "time_low"
            mt_rand(0, 0xffff),
            mt_rand(0, 0xffff),
            // 16 bits for "time_mid"
            mt_rand(0, 0xffff),
            // 16 bits for "time_hi_and_version",
            // four most significant bits holds version number 4
            mt_rand(0, 0x0fff) | 0x4000,
            // 16 bits, 8 bits for "clk_seq_hi_res",
            // 8 bits for "clk_seq_low",
            // two most significant bits holds zero and one for variant DCE1.1
            mt_rand(0, 0x3fff) | 0x8000,
            // 48 bits for "node"
            mt_rand(0, 0xffff),
            mt_rand(0, 0xffff),
            mt_rand(0, 0xffff)
        );
    }
1285114
public function getEditObjectId()
    {
        if (null === ($sId = $this->_sEditObjectId)) {
            if (null === ($sId = \OxidEsales\Eshop\Core\Registry::getConfig()->getRequestParameter("oxid"))) {
                $sId = \OxidEsales\Eshop\Core\Registry::getSession()->getVariable("saved_oxid");
            }
        }

        return $sId;
    }
650008
public function getId()
    {
        return base64_encode($this->path . implode('', $this->parameters) . implode('', $this->body) . $this->method);
    }
1307117
public static function generateGUID()
    {
        $guidStr = '';
        for ($i = 1; $i <= 16; $i++) {
            $b = (int)mt_rand(0, 0xff);
            if ($i == 7) {
                $b &= 0x0f;
                $b |= 0x40;
            } // version 4 (random)
            if ($i == 9) {
                $b &= 0x3f;
                $b |= 0x80;
            } // variant
            $guidStr .= sprintf('%02s', base_convert($b, 10, 16));
            if ($i == 4 || $i == 6 || $i == 8 || $i == 10) {
                $guidStr .= '-';
            }
        }

        return $guidStr;
    }
1045505
public function getReadableGUID()
    {
        $guid = $this->getGUID();
        if (preg_match(Number::GUID_REGEX, $guid)) {
            return $guid;
        }
        return Number::guid(false, false, $guid);
    }
142685
public function getGUIDs() {
		$options = $this->getOptions();
		$options['callback'] = false;

		$rows = new ElggBatch($this->getter, $options);

		$guids = [];
		foreach ($rows as $row) {
			$guids[] = $row->guid;
		}
		return $guids;
	}
1311288
public function getGroup(): string
    {
        if ($this->caching == false) {
            $groupId = $this->getGroupId();

            if ($groupId == -2) {
                return "";
            }

            $group = posix_getgrgid($groupId);

            return $group["name"];
        }

        if ($this->group == null) {
            $groupId = $this->getOwnerId();

            if ($groupId == -2) {
                $this->group = "";
            }

            $group = posix_getpwuid($groupId);

            $this->group = $group["name"];
        }

        return $this->group;
    }
1007821
public function generateGuid()
    {
        if (function_exists('com_create_guid') === true) {
            return trim(com_create_guid(), '{}');
        }

        return sprintf(
            '%04X%04X-%04X-%04X-%04X-%04X%04X%04X',
            mt_rand(0, 65535),
            mt_rand(0, 65535),
            mt_rand(0, 65535),
            mt_rand(16384, 20479),
            mt_rand(32768, 49151),
            mt_rand(0, 65535),
            mt_rand(0, 65535),
            mt_rand(0, 65535)
        );
    }
872257
public function getHtmlId()
    {
        $id = '';
        if (is_object($this->parent)) {
            $id = $this->parent->getHtmlId();
        }
        
        if ($this->key !== '') {
            $id .= '-' . $this->key;
        }
        
        return $id;
    }
569047
public function setGUID($guid)
    {
        $guidAttribute = $this->guidAttribute;
        if (preg_match(Number::GUID_REGEX, $guid)) {
            $guid = hex2bin(str_replace(['{', '}', '-'], '', $guid));
        }
        return (is_string($guidAttribute) && !empty($guidAttribute)) ? $this->$guidAttribute = $guid : null;
    }
1151689
public function getEditObjectId()
    {
        $sEditId = parent::getEditObjectId();
        if (!$sEditId) {
            return \OxidEsales\Eshop\Core\Registry::getConfig()->getShopId();
        }

        return $sEditId;
    }
536080
public function getId()
    {
        if (is_null($this->_id)) {
            $this->_id = md5(serialize($this->instructions));
        }

        return $this->_id;
    }
1143166
public static function createGUID() {
        if (function_exists('com_create_guid')) {
            return substr(com_create_guid(),1,36);
        }
        else {
            mt_srand((double) microtime() * 10000);
            $charid = strtoupper(md5(uniqid(rand(), true)));
            $hyphen = chr(45);
            $uuid = substr($charid, 0, 8) . $hyphen .
                    substr($charid, 8, 4) . $hyphen .
                    substr($charid, 12, 4) . $hyphen .
                    substr($charid, 16, 4) . $hyphen .
                    substr($charid, 20, 12);

            return $uuid;
        }
    }
537078
protected function uid()
	{
		if ($this->uid === null) {
			$client = $this->getClient('common');

			$this->uid = $client->call('login', array(
				$this->database,
				$this->user,
				$this->password
			));
		}

		return $this->uid;
	}
1278050
public function getActLanguageId()
    {
        if (($sValue = $this->getViewConfigParam('lang')) === null) {
            $iLang = $this->getConfig()->getRequestParameter('lang');
            $sValue = ($iLang !== null) ? $iLang : \OxidEsales\Eshop\Core\Registry::getLang()->getBaseLanguage();
            $this->setViewConfigParam('lang', $sValue);
        }

        return $sValue;
    }
295422
public static String getGuidAsString(byte[] GUID) {
        final StringBuilder res = new StringBuilder();

        res.append(AddLeadingZero((int) GUID[3] & 0xFF));
        res.append(AddLeadingZero((int) GUID[2] & 0xFF));
        res.append(AddLeadingZero((int) GUID[1] & 0xFF));
        res.append(AddLeadingZero((int) GUID[0] & 0xFF));
        res.append("-");
        res.append(AddLeadingZero((int) GUID[5] & 0xFF));
        res.append(AddLeadingZero((int) GUID[4] & 0xFF));
        res.append("-");
        res.append(AddLeadingZero((int) GUID[7] & 0xFF));
        res.append(AddLeadingZero((int) GUID[6] & 0xFF));
        res.append("-");
        res.append(AddLeadingZero((int) GUID[8] & 0xFF));
        res.append(AddLeadingZero((int) GUID[9] & 0xFF));
        res.append("-");
        res.append(AddLeadingZero((int) GUID[10] & 0xFF));
        res.append(AddLeadingZero((int) GUID[11] & 0xFF));
        res.append(AddLeadingZero((int) GUID[12] & 0xFF));
        res.append(AddLeadingZero((int) GUID[13] & 0xFF));
        res.append(AddLeadingZero((int) GUID[14] & 0xFF));
        res.append(AddLeadingZero((int) GUID[15] & 0xFF));

        return res.toString();

    }
694316
public function getGuidFromQuery() {
        if (isset($_SERVER['QUERY_STRING'])) {
            parse_str($_SERVER['QUERY_STRING'], $parsed_array);
            if (true === array_key_exists('guid', $parsed_array)) {
                return $parsed_array['guid'];
            }
        }
        return null;
    }