Jackalope\Node::getChildPath PHP Method

getChildPath() protected method

If its a relative path, prepend the path to this node, otherwise return as is
protected getChildPath ( string $p ) : string
$p string the relative or absolute property or node path
return string the absolute path to this item, with relative paths resolved against the current node
    protected function getChildPath($p)
    {
        if ('' == $p) {
            throw new InvalidArgumentException("Name can not be empty");
        }
        if ($p[0] == '/') {
            return $p;
        }
        //relative path, combine with base path for this node
        $path = $this->path === '/' ? '/' : $this->path . '/';
        return $path . $p;
    }