public function initRelation()
    {
        switch ($this->direction)
        {
            case 'in':
                // Make them nodes
                $this->start = $this->asNode($this->related);
                $this->end   = $this->asNode($this->parent);
                // Setup relationship
                $this->relation = $this->makeRelationship($this->type, $this->relation, $this->parent, $this->attributes);
            break;

            case 'out':
                // Make them nodes
                $this->start = $this->asNode($this->parent);
                $this->end   = $this->asNode($this->related);
                // Setup relationship
                $this->relation = $this->makeRelationship($this->type, $this->parent, $this->related, $this->attributes);
            break;

            default:
                throw new NoEdgeDirectionException;
            break;
        }
    }
public function initRelation()
    {
        switch ($this->direction)
        {
            case 'in':
                // Make them nodes
                $this->start = $this->asNode($this->related);
                $this->end   = $this->asNode($this->parent);
                // Setup relationship
                $this->relation = $this->makeRelationship($this->type, $this->relation, $this->parent, $this->attributes);
            break;

            case 'out':
                // Make them nodes
                $this->start = $this->asNode($this->parent);
                $this->end   = $this->asNode($this->related);
                // Setup relationship
                $this->relation = $this->makeRelationship($this->type, $this->parent, $this->related, $this->attributes);
            break;

            default:
                throw new NoEdgeDirectionException;
            break;
        }
    }
public function initRelation ( ) { switch ( $ this -> direction ) { case 'in' : // Make them nodes $ this -> start = $ this -> asNode ( $ this -> related ) ; $ this -> end = $ this -> asNode ( $ this -> parent ) ; // Setup relationship $ this -> relation = $ this -> makeRelationship ( $ this -> type , $ this -> relation , $ this -> parent , $ this -> attributes ) ; break ; case 'out' : // Make them nodes $ this -> start = $ this -> asNode ( $ this -> parent ) ; $ this -> end = $ this -> asNode ( $ this -> related ) ; // Setup relationship $ this -> relation = $ this -> makeRelationship ( $ this -> type , $ this -> parent , $ this -> related , $ this -> attributes ) ; break ; default : throw new NoEdgeDirectionException ; break ; } }
Initialize the relationship setting the start node,
end node and relation type.

@throws  \Vinelab\NeoEloquent\NoEdgeDirectionException If $direction is not set on the inheriting relation.
@return void
Initialize the relationship setting the start node end node and relation type .