我有以下
interface RepositoryInterface {
}
interface EventRepositoryInterface extends RepositoryInterface {
}
abstract class BaseRepository {
public abstract function getRepository(RepositoryInterface $repository);
}
class EventRepository extends BaseRepository {
public function getRepository(EventRepositoryInterface $repository) {
}
}
我还具有以下绑定设置
$this->app->bind(EventRepositoryInterface::class, EventRepository::class);
不是EventRepositoryInterface
和那里的RepositoryInterface
实例对于两个getRepository
函数是兼容的吗?