コード例 #1
0
 /**
  * Refreshes the user for the account interface.
  *
  * It is up to the implementation to decide if the user data should be
  * totally reloaded (e.g. from the database), or if the UserInterface
  * object can just be merged into some internal array of users / identity
  * map.
  * @param UserInterface $user
  *
  * @return UserInterface
  *
  * @throws UnsupportedUserException if the account is not supported
  */
 public function refreshUser(UserInterface $user)
 {
     return $this->managerRegistry->getManager()->getRepository('KayueWordpressBundle:User')->findOneBy(['username' => $user->getUsername()]);
 }
コード例 #2
0
 public function switchBlog($id)
 {
     $this->managerRegistry->setCurrentBlogId($id);
     $this->manager = $this->managerRegistry->getManager();
 }
コード例 #3
0
 protected function getManager()
 {
     return $this->managerRegistry->getManager();
 }