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

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

private getRelationshipNameForResource ( string $curPath, integer $pathLength ) : string
$curPath string
$pathLength integer
Результат string
    private function getRelationshipNameForResource($curPath, $pathLength)
    {
        $nextSeparatorPos = strpos($curPath, DocumentInterface::PATH_SEPARATOR, $pathLength + 1);
        $relationshipName = $nextSeparatorPos === false ? substr($curPath, $pathLength + 1) : substr($curPath, $pathLength + 1, $nextSeparatorPos - $pathLength - 1);
        return $relationshipName;
    }