예제 #1
0
 public function testBeanMe()
 {
     $c = new Client("abcd");
     $b = $c->bean("1234");
     $this->assertInstanceOf('\\CentralDesktop\\JMX\\Bean', $b);
     $this->assertSame($b->getName(), "1234");
 }
예제 #2
0
 protected function execute(InputInterface $input, OutputInterface $output)
 {
     $client = new Client($input->getArgument("uri"), $input->getOption("user"), $input->getOption("password"));
     $bean = $client->bean($input->getArgument("object"));
     $bean->read();
     $attributes = $bean->getAttributes();
     $keys = array_keys($attributes);
     foreach ($keys as $key) {
         $value = $attributes[$key];
         if (is_array($value)) {
             $output->writeln("{$key} : array(" . count($value) . ")");
             foreach ($value as $el) {
                 $output->writeln("  --> {$el} ");
             }
         } else {
             $output->writeln("{$key} : ");
         }
     }
 }