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


PHP Setup::COnfiguration方法代码示例

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


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

示例1: test

 public function test()
 {
     include_once dirname(__FILE__) . "/../../../Setup.php";
     include_once dirname(__FILE__) . "/../../../Modules/SiLCCInterface/SiLCCPreProcessingStep.php";
     $service = new ServiceInterface();
     $uri = "http://opensilcc.com/api/tag";
     $text = urlencode("In 1972, a crack commando unit was sent to prison by a military court for a crime they didn't commit. They promptly escaped from a maximum security stockade to the Los Angeles underground. Today, still wanted by the government, they survive as soldiers of fortune. If you have a problem, if no-one else can help, and if you can find them, maybe you can hire the A-Team.");
     $config = \Swiftriver\Core\Setup::COnfiguration();
     $json = $service->InterafceWithService($uri, $text, $config);
     $this->assertEquals('["crack", "commando", "unit", "prison", "court", "crime", "commit", "maximum", "security", "stockade", "Los", "Angeles", "underground", "Today", "government", "soldier", "fortune", "problem", "A-Team"]', $json);
 }
开发者ID:Bridgeborn,项目名称:Swiftriver,代码行数:11,代码来源:ServiceInterfaceTest.php

示例2: test

 public function test()
 {
     include_once dirname(__FILE__) . "/../../../Setup.php";
     include_once dirname(__FILE__) . "/../../../Modules/TagTheNetInterface/Setup.php";
     include_once dirname(__FILE__) . '/../../../Modules/TagTheNetInterface/ServiceInterface.php';
     $service = new ServiceInterface();
     $uri = "http://tagthe.net/api/";
     $text = urlencode("In 1972, a crack commando unit was sent to prison by a military court for a crime they didn't commit. They promptly escaped from a maximum security stockade to the Los Angeles underground. Today, still wanted by the government, they survive as soldiers of fortune. If you have a problem, if no-one else can help, and if you can find them, maybe you can hire the A-Team.");
     $config = \Swiftriver\Core\Setup::COnfiguration();
     $json = $service->InterafceWithService($uri, $text, $config);
     $this->assertEquals(true, 0 != strpos($json, '"dimensions":{"topic":["unit","prison","crack","crime","maximum","stockade","court","commando","security","underground"],"location":["Los Angeles"],"language":["english"]}}]}'));
 }
开发者ID:jgosier,项目名称:ushahidi_swift,代码行数:12,代码来源:ServiceInterfaceTest.php


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