public static function fromEdge(EdgeInterface $edge): EncapsulatedEdge
    {
        $encapsulated =  new EncapsulatedEdge();
        $encapsulated->id = $edge->id();
        $encapsulated->object = $edge;
        $encapsulated->classes = $encapsulated->findClasses(get_class($edge));
        return $encapsulated;
    }
public static function fromEdge(EdgeInterface $edge): EncapsulatedEdge
    {
        $encapsulated =  new EncapsulatedEdge();
        $encapsulated->id = $edge->id();
        $encapsulated->object = $edge;
        $encapsulated->classes = $encapsulated->findClasses(get_class($edge));
        return $encapsulated;
    }
public static function fromEdge ( EdgeInterface $ edge ) : EncapsulatedEdge { $ encapsulated = new EncapsulatedEdge ( ) ; $ encapsulated -> id = $ edge -> id ( ) ; $ encapsulated -> object = $ edge ; $ encapsulated -> classes = $ encapsulated -> findClasses ( get_class ( $ edge ) ) ; return $ encapsulated ; }
Creates a new capsule from an edge.

@param EdgeInterface $edge

@return EncapsulatedEdge A hydrated encapsulated edge object.
Creates a new capsule from an edge .