本文整理匯總了PHP中HTTPRequest::set方法的典型用法代碼示例。如果您正苦於以下問題:PHP HTTPRequest::set方法的具體用法?PHP HTTPRequest::set怎麽用?PHP HTTPRequest::set使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類HTTPRequest
的用法示例。
在下文中一共展示了HTTPRequest::set方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: import_xml_project_cardwall_done
/**
*
* @param array $param
* Expected key/ values:
* project_id int The ID of the project for the import
* xml_content SimpleXmlObject A string of valid xml
* mapping array An array of mappings between xml tracker IDs and their true IDs
*
*/
public function import_xml_project_cardwall_done($params)
{
$request = new HTTPRequest($params);
$request->set('action', 'import');
$request->set('xml_content', $params['xml_content']);
$request->set('mapping', $params['mapping']);
$request->set('project_id', $params['project_id']);
$this->process($request);
}
示例2: itForbidsGerritMigrationIfTuleapIsNotConnectedToLDAP
public function itForbidsGerritMigrationIfTuleapIsNotConnectedToLDAP()
{
ForgeConfig::set('sys_auth_type', 'not_ldap');
$factory = stub('GitRepositoryFactory')->getRepositoryById()->returns(mock('GitRepository'));
stub($this->user_manager)->getCurrentUser()->returns($this->admin);
$request = new HTTPRequest();
$repo_id = 999;
$server_id = 111;
$request->set('repo_id', $repo_id);
$request->set('remote_server_id', $server_id);
$git = $this->getGit($request, $factory);
$git->expectNever('addAction');
$git->expectOnce('redirect', array('/plugins/git/?group_id=' . $this->group_id));
$git->request();
}