src/mako/session/Session.php
public function generateOneTimeToken(): string
	{
		if(!empty($this->sessionData['mako.tokens']))
		{
			$this->sessionData['mako.tokens'] = array_slice($this->sessionData['mako.tokens'], 0, (static::MAX_TOKENS - 1));
		}
		else
		{
			$this->sessionData['mako.tokens'] = [];
		}

		$token = $this->generateId();

		array_unshift($this->sessionData['mako.tokens'], $token);

		return $token;
	}
public function generateOneTimeToken(): string
	{
		if(!empty($this->sessionData['mako.tokens']))
		{
			$this->sessionData['mako.tokens'] = array_slice($this->sessionData['mako.tokens'], 0, (static::MAX_TOKENS - 1));
		}
		else
		{
			$this->sessionData['mako.tokens'] = [];
		}

		$token = $this->generateId();

		array_unshift($this->sessionData['mako.tokens'], $token);

		return $token;
	}
public function generateOneTimeToken ( ) : string { if ( ! empty ( $ this -> sessionData [ 'mako.tokens' ] ) ) { $ this -> sessionData [ 'mako.tokens' ] = array_slice ( $ this -> sessionData [ 'mako.tokens' ] , 0 , ( static :: MAX_TOKENS - 1 ) ) ; } else { $ this -> sessionData [ 'mako.tokens' ] = [ ] ; } $ token = $ this -> generateId ( ) ; array_unshift ( $ this -> sessionData [ 'mako.tokens' ] , $ token ) ; return $ token ; }
Returns random security token.

@return string
Returns random security token .