Jackalope\Transport\DoctrineDBAL\Client::getNodeReferences PHP Method

getNodeReferences() private method

private getNodeReferences ( string $path, string $name = null, boolean $weakReference = false ) : array
$path string the path for which we need the references
$name string the name of the referencing properties or null for all
$weakReference boolean whether to get weak or strong references
return array list of paths to nodes that reference $path
    private function getNodeReferences($path, $name = null, $weakReference = false)
    {
        $targetId = $this->getSystemIdForNode($path);
        $params = array($targetId);
        $table = $weakReference ? $this->referenceTables[PropertyType::WEAKREFERENCE] : $this->referenceTables[PropertyType::REFERENCE];
        $query = "SELECT CONCAT(n.path, '/', r.source_property_name) FROM phpcr_nodes n\n               INNER JOIN {$table} r ON n.id = r.source_id\n               WHERE r.target_id = ?";
        if (null !== $name) {
            $query .= " AND source_property_name = ?";
            $params[] = $name;
        }
        $stmt = $this->getConnection()->executeQuery($query, $params);
        return $stmt->fetchAll(\PDO::FETCH_COLUMN);
    }