示例#1
0
 /**
  * Tests the whole getValue function, implicitly tests the getFlag function too
  */
 public function testGetValue()
 {
     $this->object->addFlag('-f', 'test', true, true);
     $this->object->addFlag('-g', 'test', true, false);
     $this->object->addAlias('-f', '--bar');
     $this->object->validate(array('-f=foo', '--bar', 'foo'));
     $this->assertEquals('foo', $this->object->getValue('-f'));
     $this->assertEquals('foo', $this->object->getValue('--bar'));
     $this->assertEquals(false, $this->object->getValue('-g'));
     $this->assertEquals(false, $this->object->getValue('--invalidFlag'));
     $this->assertNotEquals(false, $this->object->getValue('-f'));
 }
示例#2
0
$cli->addFlag('-o', _('The output directory or file if -s is used (in that case, .php will be appened to file name)'), false, true);
$cli->addFlag('-n', _('Use namespace with the name'), false, false);
$cli->addFlag('-c', _('A comma separated list of classnames to generate. If this is used only classes that exist in the list will be generated. If the service is not in this list and the -s flag is used the filename will be the name of the first class that is generated'), false, false);
$cli->addFlag('-p', _('The prefix to use for the generated classes'), false, false);
$cli->addFlag('-q', _('The suffix to use for the generated classes'), false, false);
$cli->addFlag('--singleElementArrays', _('Adds the option to use single element arrays to the client'), true, false);
$cli->addFlag('--xsiArrayType', _('Adds the option to use xsi arrays to the client'), true, false);
$cli->addFlag('--waitOneWayCalls', _('Adds the option to use wait one way calls to the client'), true, false);
$cli->addFlag('--cacheNone', _('Adds the option to not cache the wsdl to the client'), true, false);
$cli->addFlag('--cacheDisk', _('Adds the option to cache the wsdl on disk to the client'), true, false);
$cli->addFlag('--cacheMemory', _('Adds the option to cache the wsdl in memory to the client'), true, false);
$cli->addFlag('--cacheBoth', _('Adds the option to cache the wsdl in memory and on disk to the client'), true, false);
$cli->addFlag('--gzip', _('Adds the option to compress the wsdl with gzip to the client'), true, false);
$cli->addFlag('--sharedTypes', _('Adds the option to use share types'), true, false);
$cli->addFlag('-h', _('Show this help'), true, false);
$cli->addAlias('-e', '--classExists');
$cli->addAlias('-e', '--exists');
$cli->addAlias('-t', '--noTypeConstructor');
$cli->addAlias('-s', '--singleFile');
$cli->addAlias('-v', '--verbose');
$cli->addAlias('-i', '--input');
$cli->addAlias('-o', '--output');
$cli->addAlias('-n', '--namespace');
$cli->addAlias('-c', '--classes');
$cli->addAlias('-c', '--classNames');
$cli->addAlias('-c', '--classList');
$cli->addAlias('-p', '--prefix');
$cli->addAlias('-q', '--suffix');
$cli->addAlias('-h', '--help');
$cli->addAlias('-h', '--h');
$cli->validate($argv);