本文整理匯總了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);
}