References are identical for their referenced resource except for their
path. The path of the referenced resource can be obtained by calling
{@link getRepositoryPath()}:
php
$resource = new MyResource('/path');
$reference = $resource->createReference('/reference');
$reference->getPath();
"/reference"
$reference->getRepositoryPath();
"/path"
Use {@link isReference()} to find out whether a resource is a reference.