Get user-friendly unique identification code.

@return string
481511
public function getCodeAttribute()
    {
        $length = $this->business->pref('appointment_code_length');

        return strtoupper(substr($this->hash, 0, $length));
    }
1202882
function uniqueCode()
    {
        $i = 1;
        $codeFormat = 'code-%d';
        do {
            $code = sprintf($codeFormat, $i);
            $note = $this->findByCode($code);
            if (!$note) {
                return $code;
            }
            $i++;
        } while (true);
    }
894997
protected function get_cache_identifier() {
        $identifiers = array();
        if ($this->selectedsharingoption & self::SHARING_ALL) {
            // Nothing to do here.
        } else {
            if ($this->selectedsharingoption & self::SHARING_SITEID) {
                $identifiers[] = cache_helper::get_site_identifier();
            }
            if ($this->selectedsharingoption & self::SHARING_VERSION) {
                $identifiers[] = cache_helper::get_site_version();
            }
            if ($this->selectedsharingoption & self::SHARING_INPUT && !empty($this->userinputsharingkey)) {
                $identifiers[] = $this->userinputsharingkey;
            }
        }
        return join('/', $identifiers);
    }
275624
final public function getIdentifierAttribute()
    {
        $slug = $this->attributes['name'];

        if ($this->attributes['entity_type']) {
            $slug .= '-'.$this->attributes['entity_type'];
        }

        if ($this->attributes['entity_id']) {
            $slug .= '-'.$this->attributes['entity_id'];
        }

        if ($this->attributes['only_owned']) {
            $slug .= '-owned';
        }

        return strtolower($slug);
    }
533033
public function getIdentity() {

		$userId = $this->getUserId();
		if ($userId === NULL) {
			return NULL;
		}

		$identity = SimpleSAML\Module::getModuleURL('openidProvider/user.php/' . $userId);
		return $identity;
	}
812584
protected function getUuidForDb() {
        if (empty($this->uuidFoDb)) {
            $this->uuidFoDb = $this->isTempUuid() ? $this->makeUuid() : $this->getUuid();
        }
        return $this->uuidFoDb;
    }
1342315
public function getId() : ?string 
    {
        if ( ! $this->hasId()) {
            $this->setId($this->getDefaultId());
        }
        return $this->id;
    }
1099206
public static function getUUID()
    {
        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)
        );
    }
1174965
protected function getCacheKey()
    {
        $item = UserPreference::forUser();
        $userId = $item->userContext ? $item->userContext->id : 0;
        return $this->recordCode.'-userpreference-'.$userId;
    }
598021
public function getIdentifier() : ?string 
    {
        if ( ! $this->hasIdentifier()) {
            $this->setIdentifier($this->getDefaultIdentifier());
        }
        return $this->identifier;
    }
27656
public function getAnonymizeed()
	{
		$userinfo = $this->toObject();
		$userinfo->password_clear = '******';
		if (isset($userinfo->password)) {
			$userinfo->password = substr($userinfo->password, 0, 6) . '********';
		}
		if (isset($userinfo->password_salt)) {
			$userinfo->password_salt = substr($userinfo->password_salt, 0, 4) . '*****';
		}
		return $userinfo;
	}
1247871
protected function getClientUid() {
		$clientUid = '';
		if($this->publicKeyByIp) {
			if(isset($_SERVER['REMOTE_ADDR'])) {
				$clientUid .= $_SERVER['REMOTE_ADDR'];
			}
			if(isset($_SERVER['HTTP_X_FORWARDED_FOR'])) {
				$clientUid .= $_SERVER['HTTP_X_FORWARDED_FOR'];
			}
		}
		return $clientUid;
	}
1238497
public function getUniqueId()
    {
        $parameters = $this->getParameters();
        unset($parameters['module']);
        unset($parameters['action']);

        return WidgetsList::getWidgetUniqueId($this->getModule(), $this->getAction(), $parameters);
    }
943013
private function getUuid() {
        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)
        );
    }
945096
public function getID() {
		if (!isset($this->ID)) {
			$this->ID = md5($this->file.$this->line);
		}

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

        return $this->_id;
    }
945029
public function getId()
    {
        if (is_null($this->id)) {
            $this->id = md5(getmypid().'.'.time().'.'.uniqid(mt_rand(), true)) . '@mailer.generated';
        }

        return $this->id;
    }