/** * Loads IPv4Address * * @param array $port Parsed port data from csv file * @param \Entities\Vlan $vlan Vlan to assing or load ip address * @param object $em Entity manager * @return \Entities\IPv4Address */ function loadIPv4($port, $vlan, $em) { $ip4 = false; foreach ($vlan->getIPv4Addresses() as $ip) { if ($ip->getAddress() == $port['ipv4addr']) { $ip4 = $ip; break; } } return $ip4; }
public function getIPv4Addresses() { $this->__load(); return parent::getIPv4Addresses(); }