public getPropertyByPath ( string $absPath ) : PHPCR\PropertyInterface | ||
$absPath | string | The absolute path of the property to create. |
return | PHPCR\PropertyInterface |
public function getPropertyByPath($absPath)
{
list($name, $nodep) = $this->getNodePath($absPath);
// OPTIMIZE: should use transport->getProperty - when we implement this, we must make sure only one instance of each property ever exists. and do the moved/deleted checks that are done in node
$n = $this->getNodeByPath($nodep);
try {
return $n->getProperty($name);
//throws PathNotFoundException if there is no such property
} catch (PathNotFoundException $e) {
throw new ItemNotFoundException($e->getMessage(), $e->getCode(), $e);
}
}
/** * {@inheritDoc} * * @api */ public function getProperty($absPath) { try { return $this->objectManager->getPropertyByPath($absPath); } catch (ItemNotFoundException $e) { throw new PathNotFoundException($e->getMessage(), $e->getCode(), $e); } }