예제 #1
0
파일: Vlans.php 프로젝트: martinsv/phpipam
 /** 
  * read vlans 
  */
 public function readVlans()
 {
     //init Vlan class
     $vlan = new Vlan();
     //get also ids of belonging subnets?
     if ($this->_params['subnets']) {
         $vlan->subnets = true;
     }
     //get all vlans
     if ($this->_params['all']) {
         $vlan->all = true;
     } else {
         $vlan->id = $this->_params['id'];
     }
     //fetch results
     $res = $vlan->readVlan();
     //return Vlan(s) in array format
     return $res;
 }