getId() публичный Метод

public getId ( )
 /**
  * @param string string         $username
  * @param string GroupInterface $group
  *
  * @return array
  */
 public function findByIncludedUsernameWithoutGroup($username, GroupInterface $group)
 {
     $qb = $this->createQueryBuilder();
     $qb->field('groups.$id')->notEqual(new \MongoId($group->getId()));
     $qb->field('username')->equals(new \MongoRegex('/.*' . $username . '.*/i'));
     return $qb->getQuery()->execute();
 }
 /**
  * get Array with Principal-Data from User-Object.
  *
  * @param UserInterface|GroupInterface $principalObject
  * @param bool                         $show_id
  *
  * @return array
  *
  * @throws Exception
  */
 private function getPrincipalArray($principalObject, $show_id = false)
 {
     if (!$principalObject instanceof UserInterface && !$principalObject instanceof GroupInterface) {
         throw new Exception('$principalObject must be of type UserInterface of GroupInterface');
     }
     $principal = array();
     if ($show_id) {
         $principal['id'] = $principalObject->getId();
     }
     if ($principalObject instanceof UserInterface) {
         $principal['uri'] = 'principals/' . $principalObject->getUsername();
     } else {
         $principal['uri'] = 'principals/' . $principalObject->getName();
     }
     // get all fields from $this->fieldMap, additional to 'uri' and 'id'
     foreach ($this->fieldMap as $key => $value) {
         if (!method_exists($principalObject, $value['getter'])) {
             continue;
         }
         $valueGetter = call_user_func(array($principalObject, $value['getter']));
         if ($valueGetter) {
             $principal[$key] = $valueGetter;
         }
     }
     return $principal;
 }
 /**
  * @param GroupInterface $group
  * @return string
  */
 public static function getGroupAlias(GroupInterface $group)
 {
     return 'sf_group_' . $group->getId();
 }