If I have an interface in PHP, say
interface AuthenticationInterface {
}
and two classes which implement the interface, for example
class ApiKey implements AuthenticationInterface {
}
class AuthToken implements AuthenticationInterface {
}
How is it determined which of these classes is used when a new AuthenticationInterface in instantiated?