get() публичный Метод

get Project id By Project Key.
public get ( $projectIdOrKey ) : string
Результат string project id
Пример #1
0
 public function testGetProject()
 {
     //$this->markTestIncomplete();
     try {
         $proj = new ProjectService();
         $p = $proj->get('TEST');
         Dumper::dump($p);
         foreach ($p->components as $c) {
             echo 'COM : ' . $c->name . "\n";
         }
     } catch (HTTPException $e) {
         $this->assertTrue(false, $e->getMessage());
     }
 }
Пример #2
0
 protected function execute(InputInterface $input, OutputInterface $output)
 {
     // project
     $nameOrKey = strtoupper($input->getArgument('name'));
     $field_exclude = explode(',', $input->getOption('field-exclude'));
     try {
         $proj = new ProjectService();
         //Project
         $p = $proj->get($nameOrKey);
         $output->writeln($p->toString($field_exclude));
     } catch (JiraException $e) {
         $output->writeln("Error Occured! " . $e->getMessage());
     }
 }