isUser() public method

public isUser ( FOS\UserBundle\Model\UserInterface $user = null )
$user FOS\UserBundle\Model\UserInterface
Example #1
0
 /**
  * Indicates whether the given user and all compared objects correspond to the same record.
  *
  * @param UserInterface $user
  * @param array $comparisons
  * @return Boolean
  */
 protected function anyIsUser($user, array $comparisons)
 {
     foreach ($comparisons as $comparison) {
         if (!$user->isUser($comparison)) {
             return false;
         }
     }
     return true;
 }