示例#1
0
 /**
  * @return Port[]
  */
 public function getPorts()
 {
     $ret = array();
     $port = $this->api->module_port();
     foreach ($port->all(array('lease' => $this->id)) as $port) {
         $ret[] = new Port($port, $this->api);
     }
     return $ret;
 }
示例#2
0
 /**
  * @return ACL[]
  */
 function getACLs()
 {
     $ret = array();
     $target = $this->getAclType();
     $module = $this->api->module_acl($target);
     foreach ($module->all(array('port' => $this->id)) as $module) {
         $ret[] = new ACL($module, $this->api, $target);
     }
     return $ret;
 }
示例#3
0
 function testInsert()
 {
     //Setup
     $value = array('protocol' => 1);
     //not complete
     //Assert
     $client = $this->getMock(self::API_CLIENT);
     $client->expects($this->once())->method('execute')->with($this->equalTo('Port'), $this->equalTo('insert'), $this->equalTo(array('value' => $value)));
     //Do
     $api = new X4BApi($client);
     $api->module_port()->insert($value);
 }
示例#4
0
 /**
  * @return \Splitice\X4B\Modules\AclApiModule
  */
 protected function moduleApi()
 {
     return $this->api->module_acl($this->target);
 }