Beispiel #1
0
 protected function execute(InputInterface $input, OutputInterface $output)
 {
     $services = $this->container->getServiceIds();
     $container = new ReflectionClass($this->container);
     $rows = array();
     foreach ($services as $serviceId) {
         try {
             $method = $container->getMethod('get' . Container::normalizeName($serviceId));
             $doc = Annotation::parse($method->getDocComment());
             $return = $doc->getFirstAnnotation('return');
             if (!empty($return)) {
                 $definition = $return;
             } else {
                 $definition = 'void';
             }
             $rows[] = array($serviceId, $definition);
         } catch (ReflectionException $e) {
             // method does not exist
         }
     }
     $table = new Table($output);
     $table->setStyle('compact')->setRows($rows);
     $table->render();
 }
Beispiel #2
0
 public function __construct()
 {
     parent::__construct();
     $this->__bar = new \stdClass();
     $this->__foo_bar = new \stdClass();
 }