PropertyPath

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

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

© 2004–2017 Fabien Potencier
Licensed under the MIT License.
http://api.symfony.com/4.0/Symfony/Component/Validator/Util/PropertyPath.html