本文整理汇总了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