本文整理汇总了PHP中Project::getID方法的典型用法代码示例。如果您正苦于以下问题:PHP Project::getID方法的具体用法?PHP Project::getID怎么用?PHP Project::getID使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Project
的用法示例。
在下文中一共展示了Project::getID方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: importTrackerStructure
/** @return Tracker */
private function importTrackerStructure()
{
try {
return $this->xml_import->createFromXMLFile($this->project->getID(), $this->template_path);
} catch (Exception $exception) {
$logger = new BackendLogger();
$logger->error('Unable to create first kanban for ' . $this->project->getId() . ': ' . $exception->getMessage());
return;
}
}
示例2: getTopModifiedFiles
public function getTopModifiedFiles(PFUser $user, TimeInterval $interval, $limit)
{
$where_forbidden = $this->getForbiddenPaths($user);
$stats = array();
$dao = $this->getDao();
$dar = $dao->searchTopModifiedFiles($this->project->getID(), $interval, $limit, $where_forbidden);
foreach ($dar as $row) {
$stats[] = array('path' => $row['path'], 'commit_count' => $row['commit_count']);
}
return $stats;
}
示例3: updateAccessForRepositories
public function updateAccessForRepositories(Project $project, $old_access, $new_access)
{
if ($new_access == Project::ACCESS_PRIVATE) {
$this->git_permission_dao->disableAnonymousRegisteredAuthenticated($project->getID());
$this->git_system_event_manager->queueProjectsConfigurationUpdate(array($project->getID()));
}
if ($new_access == Project::ACCESS_PUBLIC && $old_access == Project::ACCESS_PUBLIC_UNRESTRICTED) {
$this->git_permission_dao->disableAuthenticated($project->getID());
$this->git_system_event_manager->queueProjectsConfigurationUpdate(array($project->getID()));
}
}
示例4: setUp
public function setUp()
{
parent::setUp();
$this->tmp_dir = '/var/tmp';
$this->fixtures_dir = dirname(__FILE__) . '/_fixtures';
$this->project_id = getmypid();
$this->project = stub('Project')->getID()->returns($this->project_id);
$this->zip = new ZipArchive();
if ($this->zip->open($this->fixtures_dir . '/archive.zip') !== true) {
$this->fail('unable to open fixture archive.zip');
}
$this->archive = new ProjectXMLImporter_XMLImportZipArchive($this->project->getID(), $this->zip, $this->tmp_dir);
}
示例5: removePreviousCrossReferences
private function removePreviousCrossReferences(Project $project, $revision, $old_commit_message)
{
$GLOBALS['group_id'] = $project->getID();
$references = $this->reference_manager->extractReferences($old_commit_message, $project->getID());
foreach ($references as $reference_instance) {
/* @var $reference Reference */
$reference = $reference_instance->getReference();
if ($reference) {
$cross_reference = new CrossReference($revision, $project->getID(), ReferenceManager::REFERENCE_NATURE_SVNREVISION, '', $reference_instance->getValue(), $reference->getGroupId(), $reference->getNature(), '', '');
$this->reference_manager->removeCrossReference($cross_reference);
}
}
}
示例6: buildRequest
/**
* @return Codendi_Request
*/
private function buildRequest(Project $project, SimpleXMLElement $xml_element)
{
$params['action'] = 'export';
$params['project_id'] = $project->getID();
$params['into_xml'] = $xml_element;
return new Codendi_Request($params);
}
示例7: getListOfAllowedServicesForProject
/**
* @return Service[]
*/
public function getListOfAllowedServicesForProject(Project $project)
{
if (!isset($this->list_of_services_per_project[$project->getID()])) {
$this->list_of_services_per_project[$project->getID()] = array();
$allowed_services_dar = $this->dao->searchByProjectIdAndShortNames($project->getID(), array_merge($this->list_of_core_services, $this->getListOfPluginBasedServices($project)));
foreach ($allowed_services_dar as $row) {
$classname = $project->getServiceClassName($row['short_name']);
try {
$this->list_of_services_per_project[$project->getID()][$row['service_id']] = new $classname($project, $row);
} catch (ServiceNotAllowedForProjectException $e) {
//don't display the row for this servce
}
}
}
return $this->list_of_services_per_project[$project->getID()];
}
示例8: getUsedLanguageForProject
/**
* @param Project $project
*
* @return string
*/
public function getUsedLanguageForProject(Project $project)
{
$result = $this->dao->getUsedLanguageForProject($project->getID());
if (!$result) {
return;
}
return $result['language'];
}
示例9: setProject
public function setProject(Project $project)
{
$this->project = $project;
$url = parent::getUrl();
$url->setQueryVar('page', 'project');
$url->setQueryVar('id', $project->getID());
$this->setContent($project->getName());
}
示例10: getVersionForProject
public function getVersionForProject(Project $project)
{
$row = $this->version_dao->getVersionForProject($project->getID());
if (!$row) {
return;
}
return $row['mw_version'];
}
示例11: getAllowedTagsFromWhiteList
public function getAllowedTagsFromWhiteList(Project $project)
{
$content = $this->getImmutableTagsWhitelistForProject($project->getID());
if (!$content) {
return array();
}
return explode(PHP_EOL, $content);
}
示例12: getServiceUsage
/**
* @param Project $project
* @param int $service_id
*
* @return Project_Service_ServiceUsage
*/
public function getServiceUsage(Project $project, $service_id)
{
$query_result = $this->dao->getServiceUsage($project->getID(), $service_id);
$row = $query_result->getRow();
if ($row) {
return $this->getInstanceFromRow($row);
}
return null;
}
示例13: getReport
protected function getReport(PFUser $user, Project $project)
{
$name = $GLOBALS['Language']->getText('plugin_tracker_homenav', 'search');
$is_query_displayed = Toggler::shouldBeDisplayed($user, 'tracker_report_query_0', true);
$report_id = $description = $current_renderer_id = $parent_report_id = $user_id = $is_default = $tracker_id = $updated_by = $updated_at = 0;
$report = new Tracker_Report($report_id, $name, $description, $current_renderer_id, $parent_report_id, $user_id, $is_default, $tracker_id, $is_query_displayed, $updated_by, $updated_at);
$report->setProjectId($project->getID());
return $report;
}
示例14: __construct
/**
* @param string $project
*/
public function __construct(Project $project)
{
$this->logger = new BackendLogger();
$this->project = $project;
$this->project_name = $project->getUnixName();
$this->project_id = $project->getID();
$this->dao = new MediawikiDao();
$this->resource_restrictor = new MediawikiSiteAdminResourceRestrictor(new MediawikiSiteAdminResourceRestrictorDao(), ProjectManager::instance());
}
示例15: getDescriptionFieldsValue
public function getDescriptionFieldsValue(Project $project)
{
$project_id = $project->getID();
$description_fields_values = array();
$results = $this->dao->getDescriptionFieldsValue($project_id);
while ($row = $results->getRow()) {
$description_fields_values[] = array('id' => $row['group_desc_id'], 'value' => $row['value']);
}
return $description_fields_values;
}