protected function getLimitationByIdentifier($identifier)
    {
        switch ($identifier) {
            case APILimitation::CONTENTTYPE:
                return new \eZ\Publish\API\Repository\Values\User\Limitation\ContentTypeLimitation();

            case APILimitation::LANGUAGE:
                return new \eZ\Publish\API\Repository\Values\User\Limitation\LanguageLimitation();

            case APILimitation::LOCATION:
                return new \eZ\Publish\API\Repository\Values\User\Limitation\LocationLimitation();

            case APILimitation::OWNER:
                return new \eZ\Publish\API\Repository\Values\User\Limitation\OwnerLimitation();

            case APILimitation::PARENTOWNER:
                return new \eZ\Publish\API\Repository\Values\User\Limitation\ParentOwnerLimitation();

            case APILimitation::PARENTCONTENTTYPE:
                return new \eZ\Publish\API\Repository\Values\User\Limitation\ParentContentTypeLimitation();

            case APILimitation::PARENTDEPTH:
                return new \eZ\Publish\API\Repository\Values\User\Limitation\ParentDepthLimitation();

            case APILimitation::SECTION:
                return new \eZ\Publish\API\Repository\Values\User\Limitation\SectionLimitation();

            case APILimitation::SITEACCESS:
                return new \eZ\Publish\API\Repository\Values\User\Limitation\SiteaccessLimitation();

            case APILimitation::STATE:
                return new \eZ\Publish\API\Repository\Values\User\Limitation\ObjectStateLimitation();

            case APILimitation::SUBTREE:
                return new \eZ\Publish\API\Repository\Values\User\Limitation\SubtreeLimitation();

            case APILimitation::USERGROUP:
                return new \eZ\Publish\API\Repository\Values\User\Limitation\UserGroupLimitation();

            case APILimitation::PARENTUSERGROUP:
                return new \eZ\Publish\API\Repository\Values\User\Limitation\ParentUserGroupLimitation();

            default:
                throw new \eZ\Publish\Core\Base\Exceptions\NotFoundException('Limitation', $identifier);
        }
    }
protected function getLimitationByIdentifier($identifier)
    {
        switch ($identifier) {
            case APILimitation::CONTENTTYPE:
                return new \eZ\Publish\API\Repository\Values\User\Limitation\ContentTypeLimitation();

            case APILimitation::LANGUAGE:
                return new \eZ\Publish\API\Repository\Values\User\Limitation\LanguageLimitation();

            case APILimitation::LOCATION:
                return new \eZ\Publish\API\Repository\Values\User\Limitation\LocationLimitation();

            case APILimitation::OWNER:
                return new \eZ\Publish\API\Repository\Values\User\Limitation\OwnerLimitation();

            case APILimitation::PARENTOWNER:
                return new \eZ\Publish\API\Repository\Values\User\Limitation\ParentOwnerLimitation();

            case APILimitation::PARENTCONTENTTYPE:
                return new \eZ\Publish\API\Repository\Values\User\Limitation\ParentContentTypeLimitation();

            case APILimitation::PARENTDEPTH:
                return new \eZ\Publish\API\Repository\Values\User\Limitation\ParentDepthLimitation();

            case APILimitation::SECTION:
                return new \eZ\Publish\API\Repository\Values\User\Limitation\SectionLimitation();

            case APILimitation::SITEACCESS:
                return new \eZ\Publish\API\Repository\Values\User\Limitation\SiteaccessLimitation();

            case APILimitation::STATE:
                return new \eZ\Publish\API\Repository\Values\User\Limitation\ObjectStateLimitation();

            case APILimitation::SUBTREE:
                return new \eZ\Publish\API\Repository\Values\User\Limitation\SubtreeLimitation();

            case APILimitation::USERGROUP:
                return new \eZ\Publish\API\Repository\Values\User\Limitation\UserGroupLimitation();

            case APILimitation::PARENTUSERGROUP:
                return new \eZ\Publish\API\Repository\Values\User\Limitation\ParentUserGroupLimitation();

            default:
                throw new \eZ\Publish\Core\Base\Exceptions\NotFoundException('Limitation', $identifier);
        }
    }
protected function getLimitationByIdentifier ( $ identifier ) { switch ( $ identifier ) { case APILimitation :: CONTENTTYPE : return new \ eZ \ Publish \ API \ Repository \ Values \ User \ Limitation \ ContentTypeLimitation ( ) ; case APILimitation :: LANGUAGE : return new \ eZ \ Publish \ API \ Repository \ Values \ User \ Limitation \ LanguageLimitation ( ) ; case APILimitation :: LOCATION : return new \ eZ \ Publish \ API \ Repository \ Values \ User \ Limitation \ LocationLimitation ( ) ; case APILimitation :: OWNER : return new \ eZ \ Publish \ API \ Repository \ Values \ User \ Limitation \ OwnerLimitation ( ) ; case APILimitation :: PARENTOWNER : return new \ eZ \ Publish \ API \ Repository \ Values \ User \ Limitation \ ParentOwnerLimitation ( ) ; case APILimitation :: PARENTCONTENTTYPE : return new \ eZ \ Publish \ API \ Repository \ Values \ User \ Limitation \ ParentContentTypeLimitation ( ) ; case APILimitation :: PARENTDEPTH : return new \ eZ \ Publish \ API \ Repository \ Values \ User \ Limitation \ ParentDepthLimitation ( ) ; case APILimitation :: SECTION : return new \ eZ \ Publish \ API \ Repository \ Values \ User \ Limitation \ SectionLimitation ( ) ; case APILimitation :: SITEACCESS : return new \ eZ \ Publish \ API \ Repository \ Values \ User \ Limitation \ SiteaccessLimitation ( ) ; case APILimitation :: STATE : return new \ eZ \ Publish \ API \ Repository \ Values \ User \ Limitation \ ObjectStateLimitation ( ) ; case APILimitation :: SUBTREE : return new \ eZ \ Publish \ API \ Repository \ Values \ User \ Limitation \ SubtreeLimitation ( ) ; case APILimitation :: USERGROUP : return new \ eZ \ Publish \ API \ Repository \ Values \ User \ Limitation \ UserGroupLimitation ( ) ; case APILimitation :: PARENTUSERGROUP : return new \ eZ \ Publish \ API \ Repository \ Values \ User \ Limitation \ ParentUserGroupLimitation ( ) ; default : throw new \ eZ \ Publish \ Core \ Base \ Exceptions \ NotFoundException ( 'Limitation' , $ identifier ) ; } }
Instantiates Limitation object based on identifier.

@param string $identifier

@throws \eZ\Publish\API\Repository\Exceptions\NotFoundException

@return \eZ\Publish\API\Repository\Values\User\Limitation

@todo Use dependency injection system
Instantiates Limitation object based on identifier .