コード例 #1
0
ファイル: RamlCommand.php プロジェクト: seytar/psx
 protected function execute(InputInterface $input, OutputInterface $output)
 {
     $documentation = Parser\Raml::fromFile($input->getArgument('file'), $input->getArgument('path'));
     switch ($input->getArgument('format')) {
         case 'serialize':
             $output->write(serialize($documentation));
             break;
         case 'php':
         default:
             $output->write(var_export($documentation, true));
             break;
     }
 }
コード例 #2
0
ファイル: PropertyRamlController.php プロジェクト: seytar/psx
 public function getDocumentation()
 {
     return Parser\Raml::fromFile(__DIR__ . '/../../Resource/property.raml', $this->context->get(Context::KEY_PATH));
 }
コード例 #3
0
ファイル: RamlTest.php プロジェクト: seytar/psx
 /**
  * @expectedException \RuntimeException
  */
 public function testFromFileNotExistingFile()
 {
     Raml::fromFile(__DIR__ . '/foo.raml', '/bar/:bar_id');
 }