本文整理汇总了PHP中Tinebase_Core::getDispatchServer方法的典型用法代码示例。如果您正苦于以下问题:PHP Tinebase_Core::getDispatchServer方法的具体用法?PHP Tinebase_Core::getDispatchServer怎么用?PHP Tinebase_Core::getDispatchServer使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Tinebase_Core
的用法示例。
在下文中一共展示了Tinebase_Core::getDispatchServer方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: testGetDispatchServerWebDAV
public function testGetDispatchServerWebDAV()
{
$request = \Zend\Http\PhpEnvironment\Request::fromString("GET /index.php?frontend=webdav HTTP/1.1\r\n" . "User-Agent: SAMSUNG-GT-I9300/101.403");
$request->setQuery(new \Zend\Stdlib\Parameters(array('frontend' => 'webdav')));
$server = Tinebase_Core::getDispatchServer($request);
$this->assertInstanceOf('Tinebase_Server_WebDAV', $server);
}
示例2: testServerGetParameter
/**
* test general functionality of Tinebase_Server_Plugin_WebDAV
*/
public function testServerGetParameter()
{
$request = \Zend\Http\PhpEnvironment\Request::fromString("POST /index.php?frontend=webdav HTTP/1.1\r\n" . "Host: localhost\r\n" . "Depth: 0\r\n" . "User-Agent: Mozilla/5.0 (X11; Linux i686; rv:15.0) Gecko/20120824 Thunderbird/15.0 Lightning/1.7");
$request->setQuery(new Zend\Stdlib\Parameters(array('frontend' => 'webdav')));
$server = Tinebase_Core::getDispatchServer($request);
$this->assertInstanceOf('Tinebase_Server_WebDAV', $server);
}
示例3: testServerPostParameter
/**
* test with post parameter requestType set to JSON
*/
public function testServerPostParameter()
{
$request = \Zend\Http\PhpEnvironment\Request::fromString("POST /index.php?requestType=JSON HTTP/1.1\r\n" . "Host: localhost\r\n" . "User-Agent: Mozilla/5.0 (X11; Linux i686; rv:15.0) Gecko/20120824 Thunderbird/15.0 Lightning/1.7");
$request->setPost(new Zend\Stdlib\Parameters(array('requestType' => 'JSON')));
$server = Tinebase_Core::getDispatchServer($request);
$this->assertInstanceOf('Tinebase_Server_Json', $server);
}
示例4: testServerUserAgentAsterisk
/**
* test general functionality of Voipmanager_Server_Plugin
*/
public function testServerUserAgentAsterisk()
{
$request = \Zend\Http\PhpEnvironment\Request::fromString(<<<EOS
POST /index.php?frontend=activesync HTTP/1.1
Host: localhost
User-Agent: asterisk-libcurl-agent/1.0
EOS
);
$server = Tinebase_Core::getDispatchServer($request);
$this->assertInstanceOf('Voipmanager_Server_Asterisk', $server);
}
示例5: testServerGetParameter
/**
* test general functionality of ActiveSync_Server_Plugin
*/
public function testServerGetParameter()
{
$request = \Zend\Http\PhpEnvironment\Request::fromString(<<<EOS
POST /index.php?frontend=activesync HTTP/1.1
Host: localhost
Depth: 0
User-Agent: Mozilla/5.0 (X11; Linux i686; rv:15.0) Gecko/20120824 Thunderbird/15.0 Lightning/1.7
EOS
);
$request->setQuery(new Zend\Stdlib\Parameters(array('frontend' => 'activesync')));
$server = Tinebase_Core::getDispatchServer($request);
$this->assertInstanceOf('ActiveSync_Server_Http', $server);
}