src/User.php
public function getUid(): string
	{
		$uid = $this->request->getCookie(self::TRACKING_COOKIE);
		if (empty($uid)) {
			$charList = 'a-f0-9';
			$uid = Random::generate(8, $charList);
			$uid .= "-" . Random::generate(4, $charList);
			$uid .= "-5" . Random::generate(3, $charList);
			$uid .= "-" . Random::generate(4, $charList);
			$uid .= "-" . Random::generate(12, $charList);

			$this->response->setCookie(self::TRACKING_COOKIE, $uid, self::TRACKING_EXPIRE);
		}
		return $uid;
	}
public function getUid(): string
	{
		$uid = $this->request->getCookie(self::TRACKING_COOKIE);
		if (empty($uid)) {
			$charList = 'a-f0-9';
			$uid = Random::generate(8, $charList);
			$uid .= "-" . Random::generate(4, $charList);
			$uid .= "-5" . Random::generate(3, $charList);
			$uid .= "-" . Random::generate(4, $charList);
			$uid .= "-" . Random::generate(12, $charList);

			$this->response->setCookie(self::TRACKING_COOKIE, $uid, self::TRACKING_EXPIRE);
		}
		return $uid;
	}
public function getUid ( ) : string { $ uid = $ this -> request -> getCookie ( self :: TRACKING_COOKIE ) ; if ( empty ( $ uid ) ) { $ charList = 'a-f0-9' ; $ uid = Random :: generate ( 8 , $ charList ) ; $ uid .= "-" . Random :: generate ( 4 , $ charList ) ; $ uid .= "-5" . Random :: generate ( 3 , $ charList ) ; $ uid .= "-" . Random :: generate ( 4 , $ charList ) ; $ uid .= "-" . Random :: generate ( 12 , $ charList ) ; $ this -> response -> setCookie ( self :: TRACKING_COOKIE , $ uid , self :: TRACKING_EXPIRE ) ; } return $ uid ; }
Vrati uzivatelske uid
@return string
Vrati uzivatelske uid