public function import(array $data): void
    {
        if(!$this->isDataSetProperly($data)) {
            return;
        }

        $wakeup = function (array $array): EncapsulatedEdge {
            return EncapsulatedEdge::fromArray($array);
        };

        $this->out = array_map($wakeup, $data["out"]); 
        $this->in = array_map($wakeup, $data["in"]); 
        foreach($data["from"] as $from => $frozen) {
            $this->from[$from] = array_map($wakeup, $frozen); 
        }
        foreach($data["to"] as $to => $frozen) {
            $this->to[$to] = array_map($wakeup, $frozen); 
        }
    }
public function import(array $data): void
    {
        if(!$this->isDataSetProperly($data)) {
            return;
        }

        $wakeup = function (array $array): EncapsulatedEdge {
            return EncapsulatedEdge::fromArray($array);
        };

        $this->out = array_map($wakeup, $data["out"]); 
        $this->in = array_map($wakeup, $data["in"]); 
        foreach($data["from"] as $from => $frozen) {
            $this->from[$from] = array_map($wakeup, $frozen); 
        }
        foreach($data["to"] as $to => $frozen) {
            $this->to[$to] = array_map($wakeup, $frozen); 
        }
    }
public function import ( array $ data ) : void { if ( ! $ this -> isDataSetProperly ( $ data ) ) { return ; } $ wakeup = function ( array $ array ) : EncapsulatedEdge { return EncapsulatedEdge :: fromArray ( $ array ) ; } ; $ this -> out = array_map ( $ wakeup , $ data [ "out" ] ) ; $ this -> in = array_map ( $ wakeup , $ data [ "in" ] ) ; foreach ( $ data [ "from" ] as $ from => $ frozen ) { $ this -> from [ $ from ] = array_map ( $ wakeup , $ frozen ) ; } foreach ( $ data [ "to" ] as $ to => $ frozen ) { $ this -> to [ $ to ] = array_map ( $ wakeup , $ frozen ) ; } }
Imports data from given array source

@param array $data Data source.

@return void
Imports data from given array source