class PropertyPath

Contains utility methods for dealing with property paths.

For more extensive functionality, use Symfony's PropertyAccess component.

Methods

static string
append(string $basePath, string $subPath)

Appends a path to a given property path.

Details

at line 37
static string append(string $basePath, string $subPath)

Appends a path to a given property path.

If the base path is empty, the appended path will be returned unchanged. If the base path is not empty, and the appended path starts with a squared opening bracket ("["), the concatenation of the two paths is returned. Otherwise, the concatenation of the two paths is returned, separated by a dot (".").

Parameters

string $basePath The base path
string $subPath The path to append

Return Value

string The concatenation of the two property paths