src/Core/Startup/AbstractConfirmationToken.php
public static function prepare_tokens($keys, HTTPRequest $request)
    {
        $target = null;
        foreach ($keys as $key) {
            $token = new static($key, $request);
            // Validate this token
            if ($token->reloadRequired() || $token->reloadRequiredIfError()) {
                $token->suppress();
                $target = $token;
            }
        }
        return $target;
    }
public static function prepare_tokens($keys, HTTPRequest $request)
    {
        $target = null;
        foreach ($keys as $key) {
            $token = new static($key, $request);
            // Validate this token
            if ($token->reloadRequired() || $token->reloadRequiredIfError()) {
                $token->suppress();
                $target = $token;
            }
        }
        return $target;
    }
public static function prepare_tokens ( $ keys , HTTPRequest $ request ) { $ target = null ; foreach ( $ keys as $ key ) { $ token = new static ( $ key , $ request ) ; // Validate this token if ( $ token -> reloadRequired ( ) || $ token -> reloadRequiredIfError ( ) ) { $ token -> suppress ( ) ; $ target = $ token ; } } return $ target ; }
Given a list of token names, suppress all tokens that have not been validated, and
return the non-validated token with the highest priority

@param array $keys List of token keys in ascending priority (low to high)
@param HTTPRequest $request
@return static The token container for the unvalidated $key given with the highest priority
Given a list of token names suppress all tokens that have not been validated and return the non - validated token with the highest priority