public function getToken($tokenId) {

		if($this->storage->hasToken($tokenId)) {
			return $this->storage->getToken($tokenId);
		}

		$token = new CsrfToken(
			$tokenId,
			$this->generateValue((int) $this->tokenLength)
		);

		$this->storage->setToken($tokenId, $token);

		return $token;
	}
public function getToken($tokenId) {

		if($this->storage->hasToken($tokenId)) {
			return $this->storage->getToken($tokenId);
		}

		$token = new CsrfToken(
			$tokenId,
			$this->generateValue((int) $this->tokenLength)
		);

		$this->storage->setToken($tokenId, $token);

		return $token;
	}
public function getToken ( $ tokenId ) { if ( $ this -> storage -> hasToken ( $ tokenId ) ) { return $ this -> storage -> getToken ( $ tokenId ) ; } $ token = new CsrfToken ( $ tokenId , $ this -> generateValue ( ( int ) $ this -> tokenLength ) ) ; $ this -> storage -> setToken ( $ tokenId , $ token ) ; return $ token ; }
returns a CSRF token for the given token id

if previously no token existed for the given id, a new token is
generated, stored and returned; otherwise the existing token is returned

@param string $tokenId
@return CsrfToken
returns a CSRF token for the given token id