Neomerx\JsonApi\Encoder\Parameters\ParametersAnalyzer::getRelationshipNameForTopResource PHP Метод

getRelationshipNameForTopResource() приватный Метод

private getRelationshipNameForTopResource ( string $curPath ) : string
$curPath string
Результат string
    private function getRelationshipNameForTopResource($curPath)
    {
        $nextSeparatorPos = strpos($curPath, DocumentInterface::PATH_SEPARATOR);
        $relationshipName = $nextSeparatorPos === false ? $curPath : substr($curPath, 0, $nextSeparatorPos);
        return $relationshipName;
    }