/** * Creates a proxy object for an Everyman relationship. * * This creates a proxy object for a Everyman relationship, given the meta repository. * * @param \Everyman\Neo4j\Relationship $relationship The node to create a proxy of. * @param \LRezek\Arachnid\Meta\Repository $repository The meta repository. * @param callable $loadCallback Callback for start/end node lazy loading. * @return mixed The proxy object. */ function fromRelation($relationship, $repository, \Closure $loadCallback) { //Get the class name from the node, and the meta from that class name $class = $relationship->getType(); //Create the proxy factory return $this->fromEntity($relationship, $class, $repository, $loadCallback); }
public function envelopes(Neo4j\Relationship $client_edge) { return $client_edge->getType() === $this->getName(); }