src/Ingewikkeld/Rest/UserBundle/ResourceMapper/User.php
public function getResource($identifier)
    {
        /** @var UserEntity $user */
        $user = $this->userManager->findUserByUsername($identifier);
        if (!$user) {
            throw new NotFoundHttpException(
                $this->translator->trans('error.user_not_found', array('%id%' => $identifier))
            );
        }

        return $this->createResourceFromUser($user);
    }
public function getResource($identifier)
    {
        /** @var UserEntity $user */
        $user = $this->userManager->findUserByUsername($identifier);
        if (!$user) {
            throw new NotFoundHttpException(
                $this->translator->trans('error.user_not_found', array('%id%' => $identifier))
            );
        }

        return $this->createResourceFromUser($user);
    }
public function getResource ( $ identifier ) { /** @var UserEntity $user */ $ user = $ this -> userManager -> findUserByUsername ( $ identifier ) ; if ( ! $ user ) { throw new NotFoundHttpException ( $ this -> translator -> trans ( 'error.user_not_found' , array ( '%id%' => $ identifier ) ) ) ; } return $ this -> createResourceFromUser ( $ user ) ; }
Returns a resource representation of the user with the given username.

@param string $identifier The username of the resource to retrieve.

@throws NotFoundHttpException if the user could not be found.

@return Resource
Returns a resource representation of the user with the given username .