original_string: 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;
      }
code: 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;
      }
code_tokens: 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 ; }
docstring: Gets the RestResource object
  
  @return RestResource
docstring_tokens: Gets the RestResource object