當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。