Created
May 19, 2012 06:07
-
-
Save coreymcmahon/2729543 to your computer and use it in GitHub Desktop.
The UserProviderInterface interface - http://www.symfonycentral.com/securing-your-web-application-with-symfony.html
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
interface UserProviderInterface | |
{ | |
/** | |
* Loads the user object for the given username. | |
* | |
* @param string $username The username | |
* @return UserInterface | |
* @throws UsernameNotFoundException If the user is not found | |
*/ | |
function loadUserByUsername($username); | |
/** | |
* Refreshes the user for the account interface. | |
* | |
* @param UserInterface $user | |
* @return UserInterface | |
* @throws UnsupportedUserException If the user type is not supported | |
*/ | |
function refreshUser(UserInterface $user); | |
/** | |
* Whether this provider supports the given user class | |
* | |
* @param string $class | |
* @return Boolean true if the provided user object is supported by this implementation of UserProviderInterface | |
*/ | |
function supportsClass($class); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment