本文整理汇总了PHP中Cli::addAlias方法的典型用法代码示例。如果您正苦于以下问题:PHP Cli::addAlias方法的具体用法?PHP Cli::addAlias怎么用?PHP Cli::addAlias使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Cli
的用法示例。
在下文中一共展示了Cli::addAlias方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: testGetValue
/**
* 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: used
$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);