Skip to content

Instantly share code, notes, and snippets.

@coreymcmahon
Created May 19, 2012 06:07
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save coreymcmahon/2729543 to your computer and use it in GitHub Desktop.
Save coreymcmahon/2729543 to your computer and use it in GitHub Desktop.
<?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