src/UrlHandlers/RestResourceHandler.php
protected function getRestResource()
    {
        $parentResource = $this->getParentResource();

        if ($parentResource !== null) {
            $childResource = $parentResource->getChildResource($this->matchingUrl);
            if ($childResource) {
                $childResource->setUrlHandler($this);
                return $childResource;
            }
        }

        $className = $this->apiResourceClassName;
        /** @var RestResource $resource */
        $resource = new $className($this->getParentResource());
        $resource->setUrlHandler($this);

        return $resource;
    }
protected function getRestResource()
    {
        $parentResource = $this->getParentResource();

        if ($parentResource !== null) {
            $childResource = $parentResource->getChildResource($this->matchingUrl);
            if ($childResource) {
                $childResource->setUrlHandler($this);
                return $childResource;
            }
        }

        $className = $this->apiResourceClassName;
        /** @var RestResource $resource */
        $resource = new $className($this->getParentResource());
        $resource->setUrlHandler($this);

        return $resource;
    }
protected function getRestResource ( ) { $ parentResource = $ this -> getParentResource ( ) ; if ( $ parentResource !== null ) { $ childResource = $ parentResource -> getChildResource ( $ this -> matchingUrl ) ; if ( $ childResource ) { $ childResource -> setUrlHandler ( $ this ) ; return $ childResource ; } } $ className = $ this -> apiResourceClassName ; /** @var RestResource $resource */ $ resource = new $ className ( $ this -> getParentResource ( ) ) ; $ resource -> setUrlHandler ( $ this ) ; return $ resource ; }
Gets the RestResource object

@return RestResource
Gets the RestResource object