Ejemplo n.º 1
0
/**
 * 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;
}
Ejemplo n.º 2
0
 public function getIPv4Addresses()
 {
     $this->__load();
     return parent::getIPv4Addresses();
 }