当前位置: 首页>>代码示例>>PHP>>正文


PHP GitRepository::setMailPrefix方法代码示例

本文整理汇总了PHP中GitRepository::setMailPrefix方法的典型用法代码示例。如果您正苦于以下问题:PHP GitRepository::setMailPrefix方法的具体用法?PHP GitRepository::setMailPrefix怎么用?PHP GitRepository::setMailPrefix使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在GitRepository的用法示例。


在下文中一共展示了GitRepository::setMailPrefix方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: hydrateRepositoryObject

 /**
  * @deprecated Should use GitRepository::getInstanceFrom row instead.
  * @param GitRepository $repository
  * @param type $result
  */
 public function hydrateRepositoryObject(GitRepository $repository, $result)
 {
     $repository->setName($result[self::REPOSITORY_NAME]);
     $repository->setPath($result[self::REPOSITORY_PATH]);
     $repository->setId($result[self::REPOSITORY_ID]);
     $repository->setDescription($result[self::REPOSITORY_DESCRIPTION]);
     $repository->setParentId($result[self::REPOSITORY_PARENT]);
     $project = ProjectManager::instance()->getProject($result[self::FK_PROJECT_ID]);
     $repository->setProject($project);
     $repository->setCreationDate($result[self::REPOSITORY_CREATION_DATE]);
     $user = UserManager::instance()->getUserById($result[self::REPOSITORY_CREATION_USER_ID]);
     $repository->setCreator($user);
     $repository->setIsInitialized($result[self::REPOSITORY_IS_INITIALIZED]);
     $repository->setDeletionDate($result[self::REPOSITORY_DELETION_DATE]);
     $repository->setAccess($result[self::REPOSITORY_ACCESS]);
     $repository->setMailPrefix($result[self::REPOSITORY_MAIL_PREFIX]);
     $repository->setBackendType($result[self::REPOSITORY_BACKEND_TYPE]);
     $repository->setNamespace($result[self::REPOSITORY_NAMESPACE]);
     $repository->setBackupPath($result[self::REPOSITORY_BACKUP_PATH]);
     $repository->setScope($result[self::REPOSITORY_SCOPE]);
     $repository->setRemoteServerId($result[self::REMOTE_SERVER_ID]);
     $repository->setRemoteServerDisconnectDate($result[self::REMOTE_SERVER_DISCONNECT_DATE]);
     $repository->setRemoteProjectDeletionDate($result[self::REMOTE_SERVER_DELETE_DATE]);
     $repository->setRemoteServerMigrationStatus($result[self::REMOTE_SERVER_MIGRATION_STATUS]);
     $repository->loadNotifiedMails();
     /* Here just for reviewer test, will be replaced by real DB data in a future changeset*/
     $result[self::ENABLE_ONLINE_EDIT] = false;
     if ($result[self::ENABLE_ONLINE_EDIT] && GitConfig::instance()->isOnlineEditEnabled()) {
         $repository->enableOnlineEdit();
     }
 }
开发者ID:blestab,项目名称:tuleap,代码行数:36,代码来源:GitDao.class.php

示例2: testGetMailHookConfig

 public function testGetMailHookConfig()
 {
     $prj = new MockProject($this);
     $prj->setReturnValue('getUnixName', 'project1');
     $prj->setReturnValue('getId', 101);
     // ShowRev
     $repo = new GitRepository();
     $repo->setId(5);
     $repo->setProject($prj);
     $repo->setName('test_default');
     $this->assertIdentical(file_get_contents($this->_fixDir . '/gitolite-mail-config/mailhook-rev.txt'), $this->project_serializer->fetchMailHookConfig($prj, $repo));
     // ShowRev + Mail
     $repo = new GitRepository();
     $repo->setId(5);
     $repo->setProject($prj);
     $repo->setName('test_default');
     $repo->setNotifiedMails(array('john.doe@enalean.com', 'mme.michue@enalean.com'));
     $this->assertIdentical(file_get_contents($this->_fixDir . '/gitolite-mail-config/mailhook-rev-mail.txt'), $this->project_serializer->fetchMailHookConfig($prj, $repo));
     // ShowRev + Mailprefix
     $repo = new GitRepository();
     $repo->setId(5);
     $repo->setProject($prj);
     $repo->setName('test_default');
     $repo->setNotifiedMails(array('john.doe@enalean.com', 'mme.michue@enalean.com'));
     $repo->setMailPrefix('[KOIN] ');
     $this->assertIdentical(file_get_contents($this->_fixDir . '/gitolite-mail-config/mailhook-rev-mail-prefix.txt'), $this->project_serializer->fetchMailHookConfig($prj, $repo));
     // ShowRev + Mailprefix
     $repo = new GitRepository();
     $repo->setId(5);
     $repo->setProject($prj);
     $repo->setName('test_default');
     $repo->setNotifiedMails(array('john.doe@enalean.com', 'mme.michue@enalean.com'));
     $repo->setMailPrefix('["\\_o<"] \\t');
     $this->assertIdentical(file_get_contents($this->_fixDir . '/gitolite-mail-config/mailhook-rev-mail-prefix-quote.txt'), $this->project_serializer->fetchMailHookConfig($prj, $repo));
 }
开发者ID:pombredanne,项目名称:tuleap,代码行数:35,代码来源:ProjectSerializerTest.php

示例3: hydrateRepositoryObject

 public function hydrateRepositoryObject(GitRepository $repository, $result)
 {
     $repository->setName($result[self::REPOSITORY_NAME]);
     $repository->setPath($result[self::REPOSITORY_PATH]);
     $repository->setId($result[self::REPOSITORY_ID]);
     $repository->setDescription($result[self::REPOSITORY_DESCRIPTION]);
     $repository->setParentId($result[self::REPOSITORY_PARENT]);
     $project = ProjectManager::instance()->getProject($result[self::FK_PROJECT_ID]);
     $repository->setProject($project);
     $repository->setCreationDate($result[self::REPOSITORY_CREATION_DATE]);
     $user = UserManager::instance()->getUserById($result[self::REPOSITORY_CREATION_USER_ID]);
     $repository->setCreator($user);
     $repository->setIsInitialized($result[self::REPOSITORY_IS_INITIALIZED]);
     $repository->setDeletionDate($result[self::REPOSITORY_DELETION_DATE]);
     $repository->setAccess($result[self::REPOSITORY_ACCESS]);
     $repository->setMailPrefix($result[self::REPOSITORY_MAIL_PREFIX]);
     $repository->setBackendType($result[self::REPOSITORY_BACKEND_TYPE]);
     $repository->setNamespace($result[self::REPOSITORY_NAMESPACE]);
     $repository->setScope($result[self::REPOSITORY_SCOPE]);
     $repository->loadNotifiedMails();
 }
开发者ID:nterray,项目名称:tuleap,代码行数:21,代码来源:GitDao.class.php


注:本文中的GitRepository::setMailPrefix方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。