eZ\Publish\Core\REST\Server\Controller\URLWildcard::createURLWildcard PHP 메소드

createURLWildcard() 공개 메소드

Creates a new URL wildcard.
public createURLWildcard ( Request $request ) : CreatedURLWildcard
$request Symfony\Component\HttpFoundation\Request
리턴 eZ\Publish\Core\REST\Server\Values\CreatedURLWildcard
    public function createURLWildcard(Request $request)
    {
        $urlWildcardCreate = $this->inputDispatcher->parse(new Message(array('Content-Type' => $request->headers->get('Content-Type')), $request->getContent()));
        try {
            $createdURLWildcard = $this->urlWildcardService->create($urlWildcardCreate['sourceUrl'], $urlWildcardCreate['destinationUrl'], $urlWildcardCreate['forward']);
        } catch (InvalidArgumentException $e) {
            throw new ForbiddenException($e->getMessage());
        }
        return new Values\CreatedURLWildcard(array('urlWildcard' => $createdURLWildcard));
    }