当前位置: 首页>>代码示例>>PHP>>正文


PHP Oara_Utilities::arguments方法代码示例

本文整理汇总了PHP中Oara_Utilities::arguments方法的典型用法代码示例。如果您正苦于以下问题:PHP Oara_Utilities::arguments方法的具体用法?PHP Oara_Utilities::arguments怎么用?PHP Oara_Utilities::arguments使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Oara_Utilities的用法示例。


在下文中一共展示了Oara_Utilities::arguments方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: realpath

 *
 * 	-s 	startDate with format dd/MM/yyyy (11/06/2011)
 *  -e 	endDate with format dd/MM/yyyy (11/06/2011)
 *	-n 	network name of the Oara_Network class for the network (AffiliateWindow, BuyAt, Dgm, WebGains......)
 *	-t 	type this param is not compulsory, choose which report we want, by default it will show us all of them (payment, merchant, transaction, overview)
 *
 *
 *	Examples from command line:
 *
 *	php affjet.php -s 12/02/2010 -e 15/06/2011 -n TradeDoubler
 *	php affjet.php -s 12/02/2010 -e 15/06/2011 -n TradeDoubler -t merchant
 *	php affjet.php -s 12/02/2010 -e 15/06/2011 -n AffiliateWindow -t payment
 *
 */
require realpath(dirname(__FILE__)) . '/../settings.php';
$arguments = Oara_Utilities::arguments($argv);
$argumentsMap = array();
$argumentsNumber = count($arguments['arguments']);
for ($i = 0; $i < $argumentsNumber; $i++) {
    $argumentsMap[$arguments['flags'][$i]] = $arguments['arguments'][$i];
}
if (isset($argumentsMap['s']) && isset($argumentsMap['e']) && isset($argumentsMap['n'])) {
    //Retrieving the credentials for the network selected
    $config = Zend_Registry::getInstance()->get('credentialsIni');
    $iniNetworkOption = strtolower($argumentsMap['n']);
    $credentials = $config->{$iniNetworkOption}->toArray();
    // Path for cookies inside of COOKIES_BASE_DIR
    $credentials["cookiesDir"] = "example";
    $credentials["cookiesSubDir"] = "Affjet";
    $credentials["cookieName"] = "test";
    //The name of the network, It should be the same that the class inside Oara/Network
开发者ID:netzkind,项目名称:php-oara,代码行数:31,代码来源:affjet.php


注:本文中的Oara_Utilities::arguments方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。