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


PHP Task::main方法代码示例

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


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

示例1: runTask

 protected function runTask(Project $project, Task $task)
 {
     // Add if the client has not already done so
     if (!$task->getProject()) {
         $task->setProject($project);
     }
     $task->main();
 }
开发者ID:halfer,项目名称:Meshing,代码行数:8,代码来源:Task.php

示例2: finished

 /**
  * Executes the task at once if it's directly beneath the <project> tag.
  */
 protected function finished()
 {
     if ($this->task !== null && $this->target === null && $this->container === null) {
         try {
             $this->task->main();
         } catch (Exception $e) {
             $this->task->log($e->getMessage(), PROJECT_MSG_ERR);
             throw $e;
         }
     }
 }
开发者ID:jonphipps,项目名称:Metadata-Registry,代码行数:14,代码来源:TaskHandler.php

示例3: process

 /**
  * Processes a list of files & directories
  *
  * @param Task      $callee
  * @param PhingFile $fromDir
  * @param array     $srcFiles
  * @param array     $srcDirs
  */
 protected function process(Task $callee, PhingFile $fromDir, $srcFiles, $srcDirs)
 {
     $mapper = null;
     if ($this->mapperElement !== null) {
         $mapper = $this->mapperElement->getImplementation();
     }
     $filecount = count($srcFiles);
     $this->total_files += $filecount;
     for ($j = 0; $j < $filecount; $j++) {
         $value = $srcFiles[$j];
         $premapped = "";
         if ($this->absparam) {
             $prop = $callee->createProperty();
             $prop->setOverride(true);
             $prop->setName($this->absparam);
             $prop->setValue($fromDir . FileSystem::getFileSystem()->getSeparator() . $value);
         }
         if ($mapper !== null) {
             $premapped = $value;
             $value = $mapper->main($value);
             if ($value === null) {
                 continue;
             }
             $value = array_shift($value);
         }
         if ($this->param) {
             $this->log("Setting param '{$this->param}' to value '{$value}'" . ($premapped ? " (mapped from '{$premapped}')" : ''), Project::MSG_VERBOSE);
             $prop = $callee->createProperty();
             $prop->setOverride(true);
             $prop->setName($this->param);
             $prop->setValue($value);
         }
         $callee->main();
     }
     $dircount = count($srcDirs);
     $this->total_dirs += $dircount;
     for ($j = 0; $j < $dircount; $j++) {
         $value = $srcDirs[$j];
         $premapped = "";
         if ($this->absparam) {
             $prop = $callee->createProperty();
             $prop->setOverride(true);
             $prop->setName($this->absparam);
             $prop->setValue($fromDir . FileSystem::getFileSystem()->getSeparator() . $value);
         }
         if ($mapper !== null) {
             $premapped = $value;
             $value = $mapper->main($value);
             if ($value === null) {
                 continue;
             }
             $value = array_shift($value);
         }
         if ($this->param) {
             $this->log("Setting param '{$this->param}' to value '{$value}'" . ($premapped ? " (mapped from '{$premapped}')" : ''), Project::MSG_VERBOSE);
             $prop = $callee->createProperty();
             $prop->setOverride(true);
             $prop->setName($this->param);
             $prop->setValue($value);
         }
         $callee->main();
     }
 }
开发者ID:codebubb,项目名称:web_ssh,代码行数:71,代码来源:ForeachTask.php

示例4: process

 /**
  * Processes a list of files & directories 
  * 
  * @param Task      $callee
  * @param PhingFile $fromDir
  * @param array     $srcFiles
  * @param array     $srcDirs
  */
 protected function process(Task $callee, PhingFile $fromDir, $srcFiles, $srcDirs)
 {
     $filecount = count($srcFiles);
     $this->total_files += $filecount;
     for ($j = 0; $j < $filecount; $j++) {
         $value = $srcFiles[$j];
         if ($this->param) {
             $this->log("Setting param '{$this->param}' to value '{$value}'", Project::MSG_VERBOSE);
             $prop = $callee->createProperty();
             $prop->setOverride(true);
             $prop->setName($this->param);
             $prop->setValue($value);
         }
         if ($this->absparam) {
             $prop = $callee->createProperty();
             $prop->setOverride(true);
             $prop->setName($this->absparam);
             $prop->setValue($fromDir . FileSystem::getFileSystem()->getSeparator() . $value);
         }
         $callee->main();
     }
     $dircount = count($srcDirs);
     $this->total_dirs += $dircount;
     for ($j = 0; $j < $dircount; $j++) {
         $value = $srcDirs[$j];
         if ($this->param) {
             $this->log("Setting param '{$this->param}' to value '{$value}'", Project::MSG_VERBOSE);
             $prop = $callee->createProperty();
             $prop->setOverride(true);
             $prop->setName($this->param);
             $prop->setValue($value);
         }
         if ($this->absparam) {
             $prop = $callee->createProperty();
             $prop->setOverride(true);
             $prop->setName($this->absparam);
             $prop->setValue($fromDir . FileSystem::getFileSystem()->getSeparator() . $value);
         }
         $callee->main();
     }
 }
开发者ID:philippjenni,项目名称:icinga-web,代码行数:49,代码来源:ForeachTask.php


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