本文整理汇总了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();
}