src/Ingewikkeld/Rest/UserBundle/ResourceMapper/User.php
public function generateReadUrl($resourceOrIdentifier)
    {
        if ($resourceOrIdentifier instanceof Resource) {
            $data = $resourceOrIdentifier->toArray();
            $id = $data['username'];
        } else {
            $id = $resourceOrIdentifier;
        }

        $route = $this->router->generate(
            'ingewikkeld_rest_user_user_read',
            array('id' => $id),
            UrlGeneratorInterface::ABSOLUTE_PATH
        );

        return $route;
    }
public function generateReadUrl($resourceOrIdentifier)
    {
        if ($resourceOrIdentifier instanceof Resource) {
            $data = $resourceOrIdentifier->toArray();
            $id = $data['username'];
        } else {
            $id = $resourceOrIdentifier;
        }

        $route = $this->router->generate(
            'ingewikkeld_rest_user_user_read',
            array('id' => $id),
            UrlGeneratorInterface::ABSOLUTE_PATH
        );

        return $route;
    }
public function generateReadUrl ( $ resourceOrIdentifier ) { if ( $ resourceOrIdentifier instanceof Resource ) { $ data = $ resourceOrIdentifier -> toArray ( ) ; $ id = $ data [ 'username' ] ; } else { $ id = $ resourceOrIdentifier ; } $ route = $ this -> router -> generate ( 'ingewikkeld_rest_user_user_read' , array ( 'id' => $ id ) , UrlGeneratorInterface :: ABSOLUTE_PATH ) ; return $ route ; }
Generate the URL for the read page for the given resource.

@param Resource|int|string $resourceOrIdentifier

@return string
Generate the URL for the read page for the given resource .