src/Ingewikkeld/Rest/UserBundle/ResourceMapper/User.php
protected function createResourceFromUser(UserEntity $user)
    {
        $resource = new Resource(
            $this->generateReadUrl($user->getUsernameCanonical()),
            array(
                 'username'   => $user->getUsernameCanonical(),
                 'email'      => $user->getEmail(),
                 'last_login' => $user->getLastLogin() ? $user->getLastLogin()->format('c') : null,
            )
        );

        return $resource;
    }
protected function createResourceFromUser(UserEntity $user)
    {
        $resource = new Resource(
            $this->generateReadUrl($user->getUsernameCanonical()),
            array(
                 'username'   => $user->getUsernameCanonical(),
                 'email'      => $user->getEmail(),
                 'last_login' => $user->getLastLogin() ? $user->getLastLogin()->format('c') : null,
            )
        );

        return $resource;
    }
protected function createResourceFromUser ( UserEntity $ user ) { $ resource = new Resource ( $ this -> generateReadUrl ( $ user -> getUsernameCanonical ( ) ) , array ( 'username' => $ user -> getUsernameCanonical ( ) , 'email' => $ user -> getEmail ( ) , 'last_login' => $ user -> getLastLogin ( ) ? $ user -> getLastLogin ( ) -> format ( 'c' ) : null , ) ) ; return $ resource ; }
Creates a resource object from the User entity.

@param UserEntity $user

@return Resource
Creates a resource object from the User entity .