diff options
Diffstat (limited to 'User/UserProviderInterface.php')
-rw-r--r-- | User/UserProviderInterface.php | 21 |
1 files changed, 18 insertions, 3 deletions
diff --git a/User/UserProviderInterface.php b/User/UserProviderInterface.php index 1c8586e..a91ace5 100644 --- a/User/UserProviderInterface.php +++ b/User/UserProviderInterface.php @@ -2,8 +2,6 @@ namespace Symfony\Component\Security\User; -use Symfony\Component\Security\Exception\UsernameNotFoundException; - /* * This file is part of the Symfony package. * @@ -22,6 +20,13 @@ use Symfony\Component\Security\Exception\UsernameNotFoundException; interface UserProviderInterface { /** + * Whether this provider is an aggregate of user providers + * + * @return Boolean + */ + function isAggregate(); + + /** * Loads the user for the given username. * * This method must throw UsernameNotFoundException if the user is not @@ -29,9 +34,19 @@ interface UserProviderInterface * * @param string $username The username * - * @return AccountInterface A user instance + * @return array of the form: array(AccountInterface, string) with the + * implementation of AccountInterface, and the name of the provider + * that was used to retrieve it * * @throws UsernameNotFoundException if the user is not found */ function loadUserByUsername($username); + + /** + * Determines whether this provider supports the given provider name + * + * @param string $providerName + * @return Boolean + */ + function supports($providerName); } |