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


PHP BuildEvent::getTarget方法代码示例

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


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

示例1: targetStarted

 /**
  *  Prints the current target name
  *
  *  @param  object  The BuildEvent
  *  @access public
  *  @see    BuildEvent::getTarget()
  */
 public function targetStarted(BuildEvent $event)
 {
     if (Project::MSG_INFO <= $this->msgOutputLevel) {
         $msg = PHP_EOL . $event->getProject()->getName() . ' > ' . $event->getTarget()->getName() . ':' . PHP_EOL;
         $this->printMessage($msg, $this->out, $event->getPriority());
     }
 }
开发者ID:alexspark21,项目名称:symfony_bisM,代码行数:14,代码来源:DefaultLogger.php

示例2: targetFinished

 /** {@inheritDoc}. */
 public function targetFinished(BuildEvent $event)
 {
     $this->log("<< TARGET FINISHED -- " . $event->getTarget()->getName(), Project::MSG_DEBUG);
     $time = $this->formatTime(Phing::currentTimeMillis() - $this->targetStartTime);
     $this->log($event->getTarget()->getName() . ":  duration " . $time, Project::MSG_VERBOSE);
     flush();
 }
开发者ID:Ingewikkeld,项目名称:phing,代码行数:8,代码来源:RecorderEntry.php

示例3: targetStarted

 function targetStarted(BuildEvent $event)
 {
     $target = $event->getTarget();
     $this->targetName = $target->getName();
 }
开发者ID:sergeytsivin,项目名称:haru,代码行数:5,代码来源:NoBannerLogger.php

示例4: targetStarted

 /**
  *  Prints the current target name
  *
  * @param BuildEvent $event
  * @see    BuildEvent::getTarget()
  */
 public function targetStarted(BuildEvent $event)
 {
     if (Project::MSG_INFO <= $this->msgOutputLevel && $event->getTarget()->getName() != '') {
         $showLongTargets = $event->getProject()->getProperty("phing.showlongtargets");
         $msg = PHP_EOL . $event->getProject()->getName() . ' > ' . $event->getTarget()->getName() . ($showLongTargets ? ' [' . $event->getTarget()->getDescription() . ']' : '') . ':' . PHP_EOL;
         $this->printMessage($msg, $this->out, $event->getPriority());
     }
 }
开发者ID:kenguest,项目名称:phing,代码行数:14,代码来源:DefaultLogger.php

示例5: targetStarted

 /**
  * Fired when a target starts building, remembers the current time and the name of the target.
  *
  * @param BuildEvent $event An event with any relevant extra information.
  *                          Will not be <code>null</code>.
  */
 public function targetStarted(BuildEvent $event)
 {
     $target = $event->getTarget();
     $targetElement = $this->doc->createElement(XmlLogger::TARGET_TAG);
     $targetElement->setAttribute(XmlLogger::NAME_ATTR, $target->getName());
     array_push($this->timesStack, Phing::currentTimeMillis());
     array_push($this->elementStack, $targetElement);
 }
开发者ID:codebubb,项目名称:web_ssh,代码行数:14,代码来源:XmlLogger.php

示例6: targetFinished

 /**
  * Logs a message to say that the target has finished.
  *
  * @param BuildEvent $event
  *            An event with any relevant extra information. Must not be
  *            <code>null</code>.
  */
 public function targetFinished(BuildEvent $event)
 {
     $start = array_pop($this->profileData);
     $name = "Target " . $event->getTarget()->getName();
     $this->logFinish($event, $start, $name);
 }
开发者ID:Ingewikkeld,项目名称:phing,代码行数:13,代码来源:ProfileLogger.php

示例7: targetStarted

 /**
  *  Prints the current target name
  *
  *  @param  object  The BuildEvent
  *  @access public
  *  @see    BuildEvent::getTarget()
  */
 function targetStarted(BuildEvent $event)
 {
     if (PROJECT_MSG_INFO <= $this->msgOutputLevel) {
         print $this->lSep . $event->getProject()->getName() . ' > ' . $event->getTarget()->getName() . ':' . $this->lSep;
     }
 }
开发者ID:Daniel-Marynicz,项目名称:symfony1-legacy,代码行数:13,代码来源:DefaultLogger.php

示例8: messageLogged

 /**
  * Fired when a message is logged, this adds a message element to the
  * most appropriate parent element (task, target or build) and records
  * the priority and text of the message.
  *
  * @param BuildEvent An event with any relevant extra information.
  *              Will not be <code>null</code>.
  */
 function messageLogged(BuildEvent $event)
 {
     $priority = $event->getPriority();
     if ($priority > $this->msgOutputLevel) {
         return;
     }
     $messageElement = $this->doc->createElement(XmlLogger::MESSAGE_TAG);
     switch ($priority) {
         case PROJECT_MSG_ERR:
             $name = "error";
             break;
         case PROJECT_MSG_WARN:
             $name = "warn";
             break;
         case PROJECT_MSG_INFO:
             $name = "info";
             break;
         default:
             $name = "debug";
             break;
     }
     $messageElement->setAttribute(XmlLogger::PRIORITY_ATTR, $name);
     $messageText = $this->doc->createCDATASection($event->getMessage());
     $messageElement->appendChild($messageText);
     if ($event->getTask() != null) {
         $this->taskElement->appendChild($messageElement);
     } else {
         if ($event->getTarget() != null) {
             $this->targetElement->appendChild($messageElement);
         } else {
             if ($this->buildElement != null) {
                 $this->buildElement->appendChild($messageElement);
             }
         }
     }
 }
开发者ID:Daniel-Marynicz,项目名称:symfony1-legacy,代码行数:44,代码来源:XmlLogger.php

示例9: targetFinished

 /**
  * Handles the Phing target finished event.
  *
  * @param       BuildEvent The Phing build event.
  *
  * @author     Noah Fontes <noah.fontes@bitextender.com>
  * @since      1.0.0
  */
 public function targetFinished(BuildEvent $phingEvent)
 {
     $event = new AgaviPhingTargetEvent();
     $event->setSource($phingEvent->getTarget());
     $event->setTarget($phingEvent->getTarget());
     $event->setProject($phingEvent->getProject());
     foreach ($this->targetListeners as $listener) {
         $listener->targetLeft($event);
     }
 }
开发者ID:horros,项目名称:agavi,代码行数:18,代码来源:AgaviPhingEventDispatcher.class.php

示例10: targetFinished

 /**
  * Logs the end of a target.
  *
  * The event is only logged if the target is not an instance of
  * <code>AgaviProxyTarget</code>.
  *
  * @param      BuildEvent An event containing the data to be logged.
  *
  * @see        AgaviProxyTarget
  * @see        DefaultLogger::targetStarted()
  *
  * @author     Noah Fontes <noah.fontes@bitextender.com>
  * @since      1.0.0
  */
 public function targetFinished(BuildEvent $event)
 {
     if (!$event->getTarget() instanceof AgaviProxyTarget) {
         parent::targetFinished($event);
     }
 }
开发者ID:philippjenni,项目名称:icinga-web,代码行数:20,代码来源:AgaviProxyBuildLogger.php


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