本文整理汇总了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);
}
示例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"]}}]}'));
}