File tree 1 file changed +22
-1
lines changed
src/Symfony/Component/Validator/Util
1 file changed +22
-1
lines changed Original file line number Diff line number Diff line change 12
12
namespace Symfony \Component \Validator \Util ;
13
13
14
14
/**
15
- * @since %%NextVersion%%
15
+ * Contains utility methods for dealing with property paths.
16
+ *
17
+ * For more extensive functionality, use Symfony's PropertyAccess component.
18
+ *
19
+ * @since 2.5
16
20
* @author Bernhard Schussek <bschussek@gmail.com>
17
21
*/
18
22
class PropertyPath
19
23
{
24
+ /**
25
+ * Appends a path to a given property path.
26
+ *
27
+ * If the base path is empty, the appended path will be returned unchanged.
28
+ * If the base path is not empty, and the appended path starts with a
29
+ * squared opening bracket ("["), the concatenation of the two paths is
30
+ * returned. Otherwise, the concatenation of the two paths is returned,
31
+ * separated by a dot (".").
32
+ *
33
+ * @param string $basePath The base path
34
+ * @param string $subPath The path to append
35
+ *
36
+ * @return string The concatenation of the two property paths
37
+ */
20
38
public static function append ($ basePath , $ subPath )
21
39
{
22
40
if ('' !== (string ) $ subPath ) {
@@ -30,6 +48,9 @@ public static function append($basePath, $subPath)
30
48
return $ basePath ;
31
49
}
32
50
51
+ /**
52
+ * Not instantiable.
53
+ */
33
54
private function __construct ()
34
55
{
35
56
}
You can’t perform that action at this time.
0 commit comments