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


PHP Issue类代码示例

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


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

示例1: testGetIssueId

 public function testGetIssueId()
 {
     $testIssueId = 'T-2';
     $xml = simplexml_load_file($this->filename);
     $issue = new Issue($xml);
     $this->assertEquals($testIssueId, $issue->getId());
 }
开发者ID:Angerslave,项目名称:youtrack,代码行数:7,代码来源:IssueTest.php

示例2: store

 public function store()
 {
     $validator = Validator::make(Input::all(), Issue::$rules, Issue::$messages);
     //if($validator->passes()){
     $issue = new Issue();
     $issue->summary = Input::get('summary');
     $issue->detail = Input::get('detail');
     $issue->budget = 0.0;
     $issue->currentState = "TO-DO";
     $issue->points = Input::get('points');
     $issue->labels = Input::get('labels');
     $issue->iterationid = Input::get('iterationid');
     $categoryId = Input::get('categoryid');
     if ($categoryId == 0) {
         //crear categoria
         $category = new Category();
         $category->name = Input::get('category_name');
         $category->save();
         $issue->categoryid = $category->id;
     } else {
         $issue->categoryid = $categoryId;
     }
     $issue->save();
     return Redirect::to('/iterations/' . $issue->iterationid)->with('message', 'Historia creada con exito');
     /*}else{
     			return Redirect::to('iterations/'. Input::get('iterationid'))
     			->with('error', 'Ocurrieron los siguientes errores')
     			->withErrors($validator)
     			->withInput();
     		}*/
 }
开发者ID:josimarjimenez,项目名称:architects,代码行数:31,代码来源:IssueController.php

示例3: destroy

 function destroy()
 {
     #    @issue_count = @category.issues.size
     #    if @issue_count == 0
     #      # No issue assigned to this category
     #      @category.destroy
     #      redirect_to :controller => 'projects', :action => 'settings', :id => @project, :tab => 'categories'
     #    elsif params[:todo]
     #      reassign_to = @project.issue_categories.find_by_id(params[:reassign_to_id]) if params[:todo] == 'reassign'
     #      @category.destroy(reassign_to)
     #      redirect_to :controller => 'projects', :action => 'settings', :id => @project, :tab => 'categories'
     #    end
     App::import('model', 'Issue');
     $Issue = new Issue();
     $issue_count = $Issue->find('count', aa('conditions', aa('category_id', $this->params['id'])));
     if ($issue_count == 0) {
         $this->IssueCategory->del($this->params['id']);
         $this->redirect(aa('controller', 'projects', 'action', 'settings', 'project_id', $this->_project['Project']['identifier'], '?', 'tab=categories'));
     } elseif ($this->data) {
         $reassgin_to = null;
         if ($this->data['IssueCategory']['todo'] == 'reassgin_to') {
             $reassgin_to = $this->data['IssueCategory']['reassign_to_id'];
         }
         $this->IssueCategory->del_with_reassgin($this->params['id'], $reassgin_to);
         $this->redirect(aa('controller', 'projects', 'action', 'settings', 'project_id', $this->_project['Project']['identifier'], '?', 'tab=categories'));
     }
     $issue_category_data = $this->IssueCategory->find('first', aa('conditions', aa('IssueCategory.id', $this->params['id'])));
     $this->set('issue_category_data', $issue_category_data);
     $this->set('issue_count', $issue_count);
 }
开发者ID:predominant,项目名称:candycane,代码行数:30,代码来源:issue_categories_controller.php

示例4: setIssueAndChanges

 public function setIssueAndChanges(Issue $issue, array $old_values)
 {
     $this->Issue = $issue;
     $this->exists = $issue->exists();
     $this->modified = $issue->getModified();
     $this->old_values = $old_values;
 }
开发者ID:jackbravo,项目名称:amaranto,代码行数:7,代码来源:IssueActivity.class.php

示例5: transform

 /**
  * Transforms an object (issue) to a string (number).
  *
  * @param  Issue|null $issue
  * @return string
  */
 public function transform($issue)
 {
     if (null === $issue) {
         return "";
     }
     return $issue->getusername();
 }
开发者ID:Jrbebel,项目名称:GestionFilm,代码行数:13,代码来源:AmisTransformer.php

示例6: transform

 /**
  * Transforms an object (issue) to a string (number).
  *
  * @param  Issue|null $issue
  * @return string
  */
 public function transform($issue)
 {
     if (null === $issue) {
         return '';
     }
     return $issue->getId();
 }
开发者ID:bruvinsky,项目名称:HighSchool,代码行数:13,代码来源:StudentToNumberTransformer.php

示例7: GetURI

 public static function GetURI($p_publicationId, $p_languageId, $p_issueNo = null, $p_sectionNo = null, $p_articleNo = null)
 {
     $translator = \Zend_Registry::get('container')->getService('translator');
     $languageObj = new Language($p_languageId);
     if (!$languageObj->exists()) {
         return new PEAR_Error($translator->trans('Language does not exist.'));
     }
     $uri = '/' . $languageObj->getCode() . '/';
     if (!is_null($p_issueNo) && is_null($p_articleNo)) {
         $issueObj = new Issue($p_publicationId, $p_languageId, $p_issueNo);
         if (!$issueObj->exists()) {
             return new PEAR_Error($translator->trans('Issue does not exist.'));
         }
         $uri .= $issueObj->getUrlName() . '/';
     }
     if (!is_null($p_sectionNo) && is_null($p_articleNo)) {
         $sectionObj = new Section($p_publicationId, $p_issueNo, $p_languageId, $p_sectionNo);
         if (!$sectionObj->exists()) {
             return new PEAR_Error($translator->trans('Section does not exist.'));
         }
         $uri .= $sectionObj->getUrlName() . '/';
     }
     if (!is_null($p_articleNo)) {
         $articleObj = new Article($p_languageId, $p_articleNo);
         if (!$articleObj->exists()) {
             return new PEAR_Error($translator->trans('Article does not exist.'));
         }
         $issueObj = new Issue($p_publicationId, $p_languageId, $articleObj->getIssueNumber());
         $sectionObj = new Section($p_publicationId, $articleObj->getIssueNumber(), $p_languageId, $articleObj->getSectionNumber());
         $uri .= $issueObj->getUrlName() . '/';
         $uri .= $sectionObj->getUrlName() . '/';
         $uri .= $articleObj->getUrlName() . '/';
     }
     return $uri;
 }
开发者ID:sourcefabric,项目名称:newscoop,代码行数:35,代码来源:ShortURL.php

示例8: setIssue

 /**
  * The setter of the field issue_id.
  * @param Issue $issue - the issue related to the reply
  */
 public function setIssue(Issue $issue)
 {
     if ($issue == NULL) {
         throw new InvalidArgumentException('[Model\\IssueReply] Invalid Model\\Issue.');
     }
     $this->issue_id = $issue->getIssueId();
 }
开发者ID:kelliany,项目名称:TestZilla,代码行数:11,代码来源:IssueReply.php

示例9: transform

 /**
  * Transforms an object (issue) to a string (number).
  *
  * @param  Issue|null $entity
  * @return string
  */
 public function transform($entity)
 {
     if (null === $entity) {
         return '';
     }
     return $entity->getId();
 }
开发者ID:TMSolution,项目名称:PrototypeBundle,代码行数:13,代码来源:EntityToNumberTransformer.php

示例10: __construct

 /**
  * @param Issue $issue
  * @param string $file
  * @param int $line
  * @param array $template_parameters
  */
 public function __construct(Issue $issue, string $file, int $line, array $template_parameters)
 {
     $this->issue = $issue;
     $this->file = $file;
     $this->line = $line;
     $this->message = vsprintf($issue->getTemplate(), $template_parameters);
 }
开发者ID:ablyler,项目名称:phan,代码行数:13,代码来源:IssueInstance.php

示例11: transform

 /**
  * Transforms an object (roles) to a string (choice).
  *
  * @param  Issue|null $roles
  * @return string
  */
 public function transform($roles)
 {
     if (null === $roles) {
         return "";
     }
     return $roles->getNumber();
 }
开发者ID:Anaroyondo,项目名称:Prescrinet,代码行数:13,代码来源:RolesToChoicesTransformer.php

示例12: GetURI

 public static function GetURI($p_publicationId, $p_languageId, $p_issueNo = null, $p_sectionNo = null, $p_articleNo = null)
 {
     $languageObj = new Language($p_languageId);
     if (!$languageObj->exists()) {
         return new PEAR_Error(getGS('Language does not exist.'));
     }
     $uri = $GLOBALS['Campsite']['SUBDIR'] . '/' . $languageObj->getCode() . '/';
     if (!is_null($p_issueNo) && is_null($p_articleNo)) {
         $issueObj = new Issue($p_publicationId, $p_languageId, $p_issueNo);
         if (!$issueObj->exists()) {
             return new PEAR_Error(getGS('Issue does not exist.'));
         }
         $uri .= $issueObj->getUrlName() . '/';
     }
     if (!is_null($p_sectionNo) && is_null($p_articleNo)) {
         $sectionObj = new Section($p_publicationId, $p_issueNo, $p_languageId, $p_sectionNo);
         if (!$sectionObj->exists()) {
             return new PEAR_Error(getGS('Section does not exist.'));
         }
         $uri .= $sectionObj->getUrlName() . '/';
     }
     if (!is_null($p_articleNo)) {
         $articleObj = new Article($p_languageId, $p_articleNo);
         if (!$articleObj->exists()) {
             return new PEAR_Error(getGS('Article does not exist.'));
         }
         $issueObj = new Issue($p_publicationId, $p_languageId, $articleObj->getIssueNumber());
         $sectionObj = new Section($p_publicationId, $articleObj->getIssueNumber(), $p_languageId, $articleObj->getSectionNumber());
         $uri .= $issueObj->getUrlName() . '/';
         $uri .= $sectionObj->getUrlName() . '/';
         $uri .= $articleObj->getUrlName() . '/';
     }
     return $uri;
 }
开发者ID:nidzix,项目名称:Newscoop,代码行数:34,代码来源:ShortURL.php

示例13: transform

 /**
  * Transforms an object (model) to a string (id).
  *
  * @param  Issue|null $model
  * @return string
  */
 public function transform($model)
 {
     if (null === $model) {
         return '';
     }
     return $model->getId();
 }
开发者ID:bgamrat,项目名称:crispy-octo-parakeet,代码行数:13,代码来源:ModelToIdTransformer.php

示例14: getTemplate

 protected function getTemplate()
 {
     if ($this->m_dbObject->getSectionTemplateId() > 0) {
         return new MetaTemplate($this->m_dbObject->getSectionTemplateId());
     }
     $sectionIssue = new Issue($this->m_dbObject->getProperty('IdPublication'), $this->m_dbObject->getProperty('IdLanguage'), $this->m_dbObject->getProperty('NrIssue'));
     return new MetaTemplate($sectionIssue->getSectionTemplateId());
 }
开发者ID:sourcefabric,项目名称:newscoop,代码行数:8,代码来源:MetaSection.php

示例15: transform

 /**
  * Transforms an object (issue) to a string (number).
  *
  * @param  Issue|null $issue
  * @return string
  */
 public function transform($issue)
 {
     if (null === $issue) {
         return '';
     }
     $this->id = $issue->getId();
     return $issue->getFirstName() . " " . $issue->getSurname() . "(" . $issue->getAddress() . ")";
 }
开发者ID:wenno2,项目名称:CBS,代码行数:14,代码来源:NameToIDTransformer.php


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